From d1c922d14dc66bc6a3e27e306ad51e5b554082f2 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Thu, 10 Oct 2024 19:41:48 -0700 Subject: [PATCH 01/11] Revise cpp-check scripts Conform to changes in F Prime --- compiler/tools/fpp-to-cpp/test/array/check-cpp | 3 +-- compiler/tools/fpp-to-cpp/test/component/compile_base_cpp | 3 +-- compiler/tools/fpp-to-cpp/test/component/impl/check-cpp | 2 +- compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp | 1 + compiler/tools/fpp-to-cpp/test/enum/check-cpp | 2 +- compiler/tools/fpp-to-cpp/test/port/check-cpp | 2 +- compiler/tools/fpp-to-cpp/test/struct/check-cpp | 2 +- compiler/tools/fpp-to-cpp/test/top/check-cpp | 1 - compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check | 3 +-- .../tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check | 3 +-- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check | 3 +-- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check | 4 ++-- 12 files changed, 12 insertions(+), 17 deletions(-) diff --git a/compiler/tools/fpp-to-cpp/test/array/check-cpp b/compiler/tools/fpp-to-cpp/test/array/check-cpp index 431a6d44d..277a2bb68 100755 --- a/compiler/tools/fpp-to-cpp/test/array/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/array/check-cpp @@ -7,7 +7,6 @@ cd `dirname $0` fprime_gcc=../../../../scripts/fprime-gcc -export FPRIME_GCC_FLAGS="-Iinclude" ../fprime/generate_cpp @@ -20,5 +19,5 @@ do cp $base.ref.hpp $base.hpp cp $base.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../../.. -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments + $fprime_gcc -Iinclude -Wno-gnu-zero-variadic-macro-arguments -c $base.cpp done diff --git a/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp b/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp index 228435ae3..4f9acdbbd 100755 --- a/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp +++ b/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp @@ -27,10 +27,9 @@ do done fprime_gcc=../../../../../scripts/fprime-gcc -export FPRIME_GCC_FLAGS="-I../../fprime" ## Set compiler flags -include_flags="-I../../../.. -I.." +include_flags="-I../../../.. -I.. -I../../fprime -I../../fprime/config" warning_flags=" -Wno-gnu-zero-variadic-macro-arguments -Wno-sign-conversion diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp b/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp index 85f0b00f0..a1921babd 100755 --- a/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp @@ -25,5 +25,5 @@ do cp $base.template.ref.hpp $base.hpp cp $base.template.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../../../.. -I.. -c $base.cpp $warning_flags + $fprime_gcc -I../../../.. -I.. -I../../fprime/config -c $base.cpp $warning_flags done diff --git a/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp b/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp index 63fbee426..41c15ab71 100755 --- a/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp @@ -17,6 +17,7 @@ include_flags=" -I../base -I../impl -I../test-base +-I../../fprime/config " define_flags="-DPROTECTED="public" -DBUILD_UT=1" diff --git a/compiler/tools/fpp-to-cpp/test/enum/check-cpp b/compiler/tools/fpp-to-cpp/test/enum/check-cpp index b5fb48b99..55f4232f2 100755 --- a/compiler/tools/fpp-to-cpp/test/enum/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/enum/check-cpp @@ -14,5 +14,5 @@ do cp $base.ref.hpp $base.hpp cp $base.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../../.. -c $base.cpp + $fprime_gcc -I../fprime/config -c $base.cpp done diff --git a/compiler/tools/fpp-to-cpp/test/port/check-cpp b/compiler/tools/fpp-to-cpp/test/port/check-cpp index 3b3b3d753..a39cf3d16 100755 --- a/compiler/tools/fpp-to-cpp/test/port/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/port/check-cpp @@ -15,5 +15,5 @@ do cp $base.ref.hpp $base.hpp cp $base.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../../.. -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments + $fprime_gcc -I../fprime/config -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments done diff --git a/compiler/tools/fpp-to-cpp/test/struct/check-cpp b/compiler/tools/fpp-to-cpp/test/struct/check-cpp index c0b6bb85c..a77f91d1a 100755 --- a/compiler/tools/fpp-to-cpp/test/struct/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/struct/check-cpp @@ -16,5 +16,5 @@ do cp $base.ref.hpp $base.hpp cp $base.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../../.. -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments + $fprime_gcc -I../fprime/config -c $base.cpp done diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp b/compiler/tools/fpp-to-cpp/test/top/check-cpp index ed7e7e4fd..3ccc792c4 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp @@ -3,5 +3,4 @@ cd `dirname $0` ../fprime/generate_cpp -export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable" (cd check-cpp-dir; ./check) diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check index 3922a976c..b635d45a8 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check @@ -1,6 +1,5 @@ #!/bin/sh -e -export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable" fpp_to_cpp=../../../../../../bin/fpp-to-cpp echo ' removing old files' @@ -17,4 +16,4 @@ do done echo ' compiling C++' -fprime-gcc -c BasicTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c BasicTopologyAc.cpp diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check index b89d99118..d2b5560ac 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check @@ -1,6 +1,5 @@ #!/bin/sh -e -export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable" fpp_to_cpp=../../../../../../bin/fpp-to-cpp echo ' removing old files' @@ -18,4 +17,4 @@ do done echo ' compiling C++' -fprime-gcc -I .. -c CommandsTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c CommandsTopologyAc.cpp diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check index ea972f173..ae0983f0f 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check @@ -1,6 +1,5 @@ #!/bin/sh -e -export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable" fpp_to_cpp=../../../../../../bin/fpp-to-cpp echo ' removing old files' @@ -17,4 +16,4 @@ do done echo ' compiling C++' -fprime-gcc -c HealthTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c HealthTopologyAc.cpp diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check index ac80feb32..d0330bc49 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check @@ -1,6 +1,5 @@ #!/bin/sh -e -export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable" fpp_to_cpp=../../../../../../bin/fpp-to-cpp echo ' removing old files' @@ -18,4 +17,5 @@ do done echo ' compiling C++' -fprime-gcc -I .. -c ParamsTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c ParamsTopologyAc.cpp + From 185b97b740ca58975a56627c76003b87680294a8 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Thu, 10 Oct 2024 19:46:50 -0700 Subject: [PATCH 02/11] Revise code gen for DpGet --- .../ComponentCppWriter/ComponentDataProducts.scala | 6 +++--- .../component/base/ActiveGetProductsComponentAc.ref.cpp | 6 +++--- .../component/base/PassiveGetProductsComponentAc.ref.cpp | 6 +++--- .../component/base/QueuedGetProductsComponentAc.ref.cpp | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala index 25caca2b1..e395b1865 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -178,9 +178,9 @@ case class ComponentDataProducts ( |Fw::Buffer buffer; |const Fw::Success::T status = this->$invokeProductGet(0, globalId, size, buffer); |if (status == Fw::Success::SUCCESS) { - | container.setId(globalId); - | container.setBuffer(buffer); - | container.setBaseId(baseId); + | // Assign a fresh DpContainer into container + | // This clears out all the state + | container = DpContainer(globalId, buffer, baseId); | container.setPriority(priority); |} |return status;""") diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp index a18be9441..8e3ad92fb 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp @@ -3433,9 +3433,9 @@ Fw::Success::T ActiveGetProductsComponentBase :: Fw::Buffer buffer; const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { - container.setId(globalId); - container.setBuffer(buffer); - container.setBaseId(baseId); + // Assign a fresh DpContainer into container + // This clears out all the state + container = DpContainer(globalId, buffer, baseId); container.setPriority(priority); } return status; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp index 6cbc25f1f..d20299494 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp @@ -2144,9 +2144,9 @@ Fw::Success::T PassiveGetProductsComponentBase :: Fw::Buffer buffer; const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { - container.setId(globalId); - container.setBuffer(buffer); - container.setBaseId(baseId); + // Assign a fresh DpContainer into container + // This clears out all the state + container = DpContainer(globalId, buffer, baseId); container.setPriority(priority); } return status; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp index c34f97834..3b832ac46 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp @@ -3433,9 +3433,9 @@ Fw::Success::T QueuedGetProductsComponentBase :: Fw::Buffer buffer; const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { - container.setId(globalId); - container.setBuffer(buffer); - container.setBaseId(baseId); + // Assign a fresh DpContainer into container + // This clears out all the state + container = DpContainer(globalId, buffer, baseId); container.setPriority(priority); } return status; From 9f0caac4a361053d4dcb55ba0e83bd0c65be1eec Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Thu, 10 Oct 2024 21:04:01 -0700 Subject: [PATCH 03/11] Revise comment in generated code --- .../CppWriter/ComponentCppWriter/ComponentDataProducts.scala | 2 +- .../test/component/base/ActiveGetProductsComponentAc.ref.cpp | 2 +- .../test/component/base/PassiveGetProductsComponentAc.ref.cpp | 2 +- .../test/component/base/QueuedGetProductsComponentAc.ref.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala index e395b1865..57fde61b5 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -179,7 +179,7 @@ case class ComponentDataProducts ( |const Fw::Success::T status = this->$invokeProductGet(0, globalId, size, buffer); |if (status == Fw::Success::SUCCESS) { | // Assign a fresh DpContainer into container - | // This clears out all the state + | // This action clears out all the container state | container = DpContainer(globalId, buffer, baseId); | container.setPriority(priority); |} diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp index 8e3ad92fb..0fdb6e1bc 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp @@ -3434,7 +3434,7 @@ Fw::Success::T ActiveGetProductsComponentBase :: const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { // Assign a fresh DpContainer into container - // This clears out all the state + // This action clears out all the container state container = DpContainer(globalId, buffer, baseId); container.setPriority(priority); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp index d20299494..37e54a072 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp @@ -2145,7 +2145,7 @@ Fw::Success::T PassiveGetProductsComponentBase :: const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { // Assign a fresh DpContainer into container - // This clears out all the state + // This action clears out all the container state container = DpContainer(globalId, buffer, baseId); container.setPriority(priority); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp index 3b832ac46..5321ffd6b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp @@ -3434,7 +3434,7 @@ Fw::Success::T QueuedGetProductsComponentBase :: const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { // Assign a fresh DpContainer into container - // This clears out all the state + // This action clears out all the container state container = DpContainer(globalId, buffer, baseId); container.setPriority(priority); } From a9e2791f60183fd427c8a6daf694f9635e43183a Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Thu, 10 Oct 2024 21:13:36 -0700 Subject: [PATCH 04/11] Revise cpp-check scripts --- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check | 2 +- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check | 2 +- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check | 2 +- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check index b635d45a8..83806a6ac 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check @@ -16,4 +16,4 @@ do done echo ' compiling C++' -fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c BasicTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c BasicTopologyAc.cpp diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check index d2b5560ac..6775f3fc7 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Commands/check @@ -17,4 +17,4 @@ do done echo ' compiling C++' -fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c CommandsTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c CommandsTopologyAc.cpp diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check index ae0983f0f..d2a15f3f5 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Health/check @@ -16,4 +16,4 @@ do done echo ' compiling C++' -fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c HealthTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c HealthTopologyAc.cpp diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check index d0330bc49..8d0dfc1e1 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check @@ -17,5 +17,5 @@ do done echo ' compiling C++' -fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -Wno-unused-variable -c ParamsTopologyAc.cpp +fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c ParamsTopologyAc.cpp From d2c31ce444cb4749d704715816df09887d436068 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Thu, 10 Oct 2024 21:17:30 -0700 Subject: [PATCH 05/11] Revise check-cpp scripts --- compiler/tools/fpp-to-cpp/test/array/check-cpp | 2 +- compiler/tools/fpp-to-cpp/test/component/compile_base_cpp | 1 - compiler/tools/fpp-to-cpp/test/component/impl/check-cpp | 3 +-- compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp | 3 +-- compiler/tools/fpp-to-cpp/test/port/check-cpp | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/compiler/tools/fpp-to-cpp/test/array/check-cpp b/compiler/tools/fpp-to-cpp/test/array/check-cpp index 277a2bb68..957a6e566 100755 --- a/compiler/tools/fpp-to-cpp/test/array/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/array/check-cpp @@ -19,5 +19,5 @@ do cp $base.ref.hpp $base.hpp cp $base.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -Iinclude -Wno-gnu-zero-variadic-macro-arguments -c $base.cpp + $fprime_gcc -Iinclude -c $base.cpp done diff --git a/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp b/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp index 4f9acdbbd..506e4ea6d 100755 --- a/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp +++ b/compiler/tools/fpp-to-cpp/test/component/compile_base_cpp @@ -31,7 +31,6 @@ fprime_gcc=../../../../../scripts/fprime-gcc ## Set compiler flags include_flags="-I../../../.. -I.. -I../../fprime -I../../fprime/config" warning_flags=" --Wno-gnu-zero-variadic-macro-arguments -Wno-sign-conversion -Wno-unused-parameter -Wno-vla-extension diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp b/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp index a1921babd..415843660 100755 --- a/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/check-cpp @@ -5,7 +5,6 @@ cd `dirname $0` fprime_gcc=../../../../../scripts/fprime-gcc export FPRIME_GCC_FLAGS="-I../../fprime" warning_flags=" --Wno-gnu-zero-variadic-macro-arguments -Wno-return-type -Wno-unused-parameter " @@ -25,5 +24,5 @@ do cp $base.template.ref.hpp $base.hpp cp $base.template.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../../../.. -I.. -I../../fprime/config -c $base.cpp $warning_flags + $fprime_gcc -I../../../.. -I.. -I../../fprime/config $warning_flags -c $base.cpp done diff --git a/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp b/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp index 41c15ab71..1ab19c012 100755 --- a/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp @@ -5,7 +5,6 @@ cd `dirname $0` fprime_gcc=../../../../../scripts/fprime-gcc export FPRIME_GCC_FLAGS="-I../../fprime" warning_flags=" --Wno-gnu-zero-variadic-macro-arguments -Wno-return-type -Wno-sign-conversion -Wno-unused-parameter @@ -45,5 +44,5 @@ do base=`basename $file .ref.cpp` cp $file $base.cpp echo "compiling $base.cpp" - $fprime_gcc $include_flags -c $define_flags $warning_flags $base.cpp + $fprime_gcc $include_flags $define_flags $warning_flags -c $base.cpp done diff --git a/compiler/tools/fpp-to-cpp/test/port/check-cpp b/compiler/tools/fpp-to-cpp/test/port/check-cpp index a39cf3d16..fe96ff82e 100755 --- a/compiler/tools/fpp-to-cpp/test/port/check-cpp +++ b/compiler/tools/fpp-to-cpp/test/port/check-cpp @@ -15,5 +15,5 @@ do cp $base.ref.hpp $base.hpp cp $base.ref.cpp $base.cpp echo "compiling $base.cpp" - $fprime_gcc -I../fprime/config -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments + $fprime_gcc -I../fprime/config -c $base.cpp done From 967d39831d19452e6497a53bf0ffd2f654c5bd70 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Thu, 10 Oct 2024 21:21:19 -0700 Subject: [PATCH 06/11] Remove blank line --- compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check index 8d0dfc1e1..2b9801338 100755 --- a/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check +++ b/compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Params/check @@ -18,4 +18,3 @@ done echo ' compiling C++' fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c ParamsTopologyAc.cpp - From 62d55ecb0a1b62c924fda994b2f01b22e72d4392 Mon Sep 17 00:00:00 2001 From: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:19:38 -0700 Subject: [PATCH 07/11] Upgrade GH Ations ahead of NodeJS 16 deprecation --- .github/workflows/build-test.yml | 4 ++-- .github/workflows/native-build.yml | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6543bf6c4..910866dbd 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -15,9 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 849f4ab5f..ae3537c9e 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -53,7 +53,7 @@ jobs: name: "Build Standard JARs" steps: - name: "Checkout repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: "Setup Native Image Tools" @@ -64,7 +64,7 @@ jobs: ${{ inputs.build }} ${{ inputs.output-directory }} shell: bash - name: "Archiving JARs package" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build-jar path: ${{ inputs.output-directory }}/* @@ -80,7 +80,7 @@ jobs: ${{ inputs.test }} echo -e "Trace output files:\n$( find ${{ inputs.trace-directory }} -name *.json )" - name: "Archiving Tracing" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jar-traces path: ${{ inputs.trace-directory }}/*.json @@ -139,19 +139,19 @@ jobs: echo "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION=node16" >> $GITHUB_ENV echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV - name: "Checkout repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: "Setup Native Image Tools" uses: fprime-community/native-images-action@main - name: "Download JARs" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: build-jar path: ${{ inputs.output-directory }} - if: ${{ inputs.trace }} name: "Download Tracing" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jar-traces path: ${{ inputs.trace-directory }} @@ -162,7 +162,7 @@ jobs: $NATIVE_IMAGE_TOOLS_PATH/native-images ${{ inputs.output-directory }} ${{ inputs.tools }} shell: bash - name: "Archive Native Images" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build-${{ matrix.run.tag }} path: ${{ inputs.output-directory }}/* @@ -179,11 +179,11 @@ jobs: matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }} steps: - name: "Checkout repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: "Download Package" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: build-${{ matrix.tag }} path: ${{ inputs.output-directory }} @@ -205,7 +205,7 @@ jobs: fprime-native-packager ${{ inputs.output-directory }} ${FLAGS} shell: bash - name: "Archiving Wheels" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.tag }} path: packages/dist/* @@ -220,12 +220,12 @@ jobs: - name: "Setup Native Image Tools" uses: fprime-community/native-images-action@main - name: "Download Native Wheels" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: wheels-${{ matrix.run.tag }} path: ${{ inputs.output-directory }}/native - name: "Download JAR Wheels" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: wheels-jar path: ${{ inputs.output-directory }}/jars @@ -247,7 +247,7 @@ jobs: matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }} steps: - name: "Download Package" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: wheels-${{ matrix.tag }} path: dist From 3d47a92893846abedcc578b84839fd505958337b Mon Sep 17 00:00:00 2001 From: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:20:16 -0700 Subject: [PATCH 08/11] Lock CI runs-on to ubuntu-22.04 --- .github/workflows/build-test.yml | 2 +- .github/workflows/native-build.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 910866dbd..f1a6ec26e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -12,7 +12,7 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index ae3537c9e..1ca8d5372 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -49,7 +49,7 @@ on: type: boolean jobs: build-jars: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" name: "Build Standard JARs" steps: - name: "Checkout repository" @@ -90,7 +90,7 @@ jobs: outputs: native: ${{ steps.set-matrix.outputs.native }} tags: ${{ steps.set-matrix.outputs.tags }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - id: set-matrix shell: python @@ -105,7 +105,7 @@ jobs: "tag": "macosx_12_0_universal2" }, { - "runner": "ubuntu-latest", + "runner": "ubuntu-22.04", "tag": "manylinux2014_x86_64", "container": "quay.io/pypa/manylinux2014_x86_64" } @@ -174,7 +174,7 @@ jobs: ${{ inputs.test }} build-wheels: needs: [build-jars, build-native-images, generate-run-matricies] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }} steps: @@ -242,7 +242,7 @@ jobs: publish-wheels: if: ${{ github.event_name == 'release' }} needs: [test-wheels, generate-run-matricies] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }} steps: From 8a1563930fdfc299edfab7ee54551e6df1b100dd Mon Sep 17 00:00:00 2001 From: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:54:04 -0700 Subject: [PATCH 09/11] Remove legacy fix for NodeJS 16 --- .github/workflows/native-build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 1ca8d5372..ca3b31cb7 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -131,13 +131,6 @@ jobs: container: image: ${{ matrix.run.container || '' }} steps: - - name: "Fix environment" - run: | - # https://github.com/actions/checkout/issues/1809 - # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - echo "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION=node16" >> $GITHUB_ENV - echo "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION=node16" >> $GITHUB_ENV - echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV - name: "Checkout repository" uses: actions/checkout@v4 with: From 1407109cc8125315dfff66f8925800fa2bae9fde Mon Sep 17 00:00:00 2001 From: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:33:34 -0700 Subject: [PATCH 10/11] Revert containerized steps to use v3 versions --- .github/workflows/native-build.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index ca3b31cb7..9b44f6b72 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -131,20 +131,30 @@ jobs: container: image: ${{ matrix.run.container || '' }} steps: + - name: "Fix environment" + run: | + # https://github.com/actions/checkout/issues/1809 + # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ + # + # NOTE: actions/checkout et al. @v3 are deprecated - however the manylinux2014_x86_64 Docker image does not have node20 + # which prevents from upgrading to @v4. We keep the deprecated versions (@v3) for now for lack of a better solution + echo "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION=node16" >> $GITHUB_ENV + echo "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION=node16" >> $GITHUB_ENV + echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV - name: "Checkout repository" - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: submodules: recursive - name: "Setup Native Image Tools" uses: fprime-community/native-images-action@main - name: "Download JARs" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: build-jar path: ${{ inputs.output-directory }} - if: ${{ inputs.trace }} name: "Download Tracing" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: jar-traces path: ${{ inputs.trace-directory }} @@ -155,7 +165,7 @@ jobs: $NATIVE_IMAGE_TOOLS_PATH/native-images ${{ inputs.output-directory }} ${{ inputs.tools }} shell: bash - name: "Archive Native Images" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: build-${{ matrix.run.tag }} path: ${{ inputs.output-directory }}/* From da3b681c089e9d20e901676372752348abfb4c02 Mon Sep 17 00:00:00 2001 From: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:41:17 -0700 Subject: [PATCH 11/11] Revert all changes except ubuntu-22.04 --- .github/workflows/build-test.yml | 4 ++-- .github/workflows/native-build.yml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f1a6ec26e..fa340f2ef 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -15,9 +15,9 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up JDK 11 - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: java-version: '11' distribution: 'temurin' diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 9b44f6b72..b074762ff 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -53,7 +53,7 @@ jobs: name: "Build Standard JARs" steps: - name: "Checkout repository" - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: submodules: recursive - name: "Setup Native Image Tools" @@ -64,7 +64,7 @@ jobs: ${{ inputs.build }} ${{ inputs.output-directory }} shell: bash - name: "Archiving JARs package" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: build-jar path: ${{ inputs.output-directory }}/* @@ -80,7 +80,7 @@ jobs: ${{ inputs.test }} echo -e "Trace output files:\n$( find ${{ inputs.trace-directory }} -name *.json )" - name: "Archiving Tracing" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: jar-traces path: ${{ inputs.trace-directory }}/*.json @@ -182,11 +182,11 @@ jobs: matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }} steps: - name: "Checkout repository" - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: submodules: recursive - name: "Download Package" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: build-${{ matrix.tag }} path: ${{ inputs.output-directory }} @@ -208,7 +208,7 @@ jobs: fprime-native-packager ${{ inputs.output-directory }} ${FLAGS} shell: bash - name: "Archiving Wheels" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: wheels-${{ matrix.tag }} path: packages/dist/* @@ -223,12 +223,12 @@ jobs: - name: "Setup Native Image Tools" uses: fprime-community/native-images-action@main - name: "Download Native Wheels" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: wheels-${{ matrix.run.tag }} path: ${{ inputs.output-directory }}/native - name: "Download JAR Wheels" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: wheels-jar path: ${{ inputs.output-directory }}/jars @@ -250,7 +250,7 @@ jobs: matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }} steps: - name: "Download Package" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: wheels-${{ matrix.tag }} path: dist