From 614f37a78f929387892e3b4c5f04258ed875f46f Mon Sep 17 00:00:00 2001 From: Matthew McCall Date: Tue, 17 Mar 2026 16:33:40 -0400 Subject: [PATCH 1/3] Update Eigen integration and replace `gsl::not_null` with `gsl_lite::not_null`. Standardize dependency management and improve code consistency. --- CMakeLists.txt | 51 ++++---- cli/main.cpp | 2 +- cmake/FetchEigen.cmake | 15 ++- include/Oasis/MatchCast.hpp | 6 +- include/Oasis/SimplifyVisitor.hpp | 5 +- io/include/Oasis/MathMLSerializer.hpp | 12 +- io/src/MathMLSerializer.cpp | 36 +++--- src/SimplifyVisitor.cpp | 168 +++++++++++++------------- 8 files changed, 151 insertions(+), 144 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74eb4cf0..3650b81f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,20 +47,16 @@ if(OASIS_BUILD_WITH_COVERAGE) endif() # Fetches dependencies and integrates them into the project. -FetchContent_Declare( - Catch2 - GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v3.4.0 - FIND_PACKAGE_ARGS) - # Perhaps one day use Microsoft.GSL if # https://github.com/microsoft/GSL/issues/991 gets addressed FetchContent_Declare( - GSL - GIT_REPOSITORY "https://github.com/gsl-lite/gsl-lite.git" - GIT_TAG v0.42.0) + GSL + GIT_REPOSITORY "https://github.com/gsl-lite/gsl-lite.git" + GIT_TAG v1.1.0 + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS CONFIG) -FetchContent_MakeAvailable(Catch2 GSL) +FetchContent_MakeAvailable(GSL) if(NOT OASIS_BUILD_JS) include(cmake/FetchBoost.cmake) @@ -72,28 +68,41 @@ include(cmake/FetchEigen.cmake) add_subdirectory(include) add_subdirectory(src) +if(OASIS_BUILD_TESTS) + FetchContent_Declare( + Catch2 + GIT_REPOSITORY "https://github.com/catchorg/Catch2.git" + GIT_TAG v3.13.0 + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS CONFIG) + + FetchContent_MakeAvailable(Catch2) + add_subdirectory(tests) +endif() + if(OASIS_BUILD_IO) include(cmake/FetchTinyxml2.cmake) add_subdirectory(io) endif() -if(OASIS_BUILD_TESTS) - add_subdirectory(tests) -endif() - if(OASIS_BUILD_CLI) FetchContent_Declare( - fmt - GIT_REPOSITORY https://github.com/fmtlib/fmt - GIT_TAG 11.1.3) + fmt + GIT_REPOSITORY "https://github.com/fmtlib/fmt" + GIT_TAG 12.1.0 + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS CONFIG + ) FetchContent_Declare( - Isocline - GIT_REPOSITORY https://github.com/daanx/isocline.git - GIT_TAG v1.0.9) + Isocline + GIT_REPOSITORY "https://github.com/daanx/isocline.git" + GIT_TAG v1.0.9 + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS CONFIG + ) FetchContent_MakeAvailable(fmt Isocline) - add_subdirectory(cli) endif() diff --git a/cli/main.cpp b/cli/main.cpp index 896c66c3..66a63a4e 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -60,7 +60,7 @@ int main(int argc, char** argv) // Calling Oasis::FromInFix passed as template fails because defaulted parameters aren't represented in the type, so a wrapper is needed auto result = (input | Oasis::PreProcessInFix | Parse) - .and_then([&simplifyVisitor](const std::unique_ptr& expr) -> std::expected>, std::string> { + .and_then([&simplifyVisitor](const std::unique_ptr& expr) -> std::expected>, std::string> { return expr->Accept(simplifyVisitor); }) .and_then([&serializer](const std::unique_ptr& expr) -> std::expected { diff --git a/cmake/FetchEigen.cmake b/cmake/FetchEigen.cmake index 2639c2a6..26c67f5d 100644 --- a/cmake/FetchEigen.cmake +++ b/cmake/FetchEigen.cmake @@ -6,17 +6,16 @@ # See https://stackoverflow.com/a/65899078. -# Fetches the "eigen" dependency and integrates it into the project. +# Fetches the "Eigen" dependency and integrates it into the project. FetchContent_Declare( - eigen - GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git - GIT_TAG nightly) - -# Disables some of eigen's build options. -set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + Eigen + GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git + GIT_TAG 5.0.1 + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS CONFIG) set(EIGEN_BUILD_PKGCONFIG OFF) set(EIGEN_BUILD_DOC OFF) set(BUILD_TESTING OFF) -FetchContent_MakeAvailable(eigen) +FetchContent_MakeAvailable(Eigen) diff --git a/include/Oasis/MatchCast.hpp b/include/Oasis/MatchCast.hpp index b59e78b5..f5159e91 100644 --- a/include/Oasis/MatchCast.hpp +++ b/include/Oasis/MatchCast.hpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -34,7 +34,7 @@ using lambda_argument_type = std::remove_cvref_t concept TransformerAcceptsCheckArg = requires(TransformerF f, const lambda_argument_type& t) { - { f(t, nullptr) } -> std::same_as>, std::string_view>>; + { f(t, nullptr) } -> std::same_as>, std::string_view>>; } && std::predicate&>; template @@ -62,7 +62,7 @@ class MatchCastImpl { auto [check, transformer] = checkAndTransformer; if (std::unique_ptr castResult = RecursiveCast(arg); castResult && check(*castResult)) - result = transformer(*castResult, visitor).transform([](gsl::not_null>&& transformResult) { return std::move(transformResult); }); + result = transformer(*castResult, visitor).transform([](gsl_lite::not_null>&& transformResult) { return std::move(transformResult); }); }); return result; } diff --git a/include/Oasis/SimplifyVisitor.hpp b/include/Oasis/SimplifyVisitor.hpp index 4b85e63a..ad0c19d7 100644 --- a/include/Oasis/SimplifyVisitor.hpp +++ b/include/Oasis/SimplifyVisitor.hpp @@ -5,10 +5,9 @@ #ifndef SIMPLIFYVISITOR_HPP #define SIMPLIFYVISITOR_HPP -#include #include -#include +#include #include "Oasis/Visit.hpp" @@ -22,7 +21,7 @@ struct SimplifyOpts { = AngleUnits::RADIANS; }; -class SimplifyVisitor final : public TypedVisitor>, std::string>> { +class SimplifyVisitor final : public TypedVisitor>, std::string>> { public: SimplifyVisitor(); explicit SimplifyVisitor(SimplifyOpts& opts); diff --git a/io/include/Oasis/MathMLSerializer.hpp b/io/include/Oasis/MathMLSerializer.hpp index 7f83d165..3ccdd92d 100644 --- a/io/include/Oasis/MathMLSerializer.hpp +++ b/io/include/Oasis/MathMLSerializer.hpp @@ -5,7 +5,7 @@ #ifndef MATHMLSERIALIZER_HPP #define MATHMLSERIALIZER_HPP -#include +#include #include #include "Oasis/BinaryExpression.hpp" @@ -14,7 +14,7 @@ namespace Oasis { -class MathMLSerializer final : public TypedVisitor, std::string>> { +class MathMLSerializer final : public TypedVisitor, std::string>> { public: explicit MathMLSerializer(tinyxml2::XMLDocument& doc); @@ -40,15 +40,15 @@ class MathMLSerializer final : public TypedVisitor std::expected, gsl::not_null>, std::string>; + auto GetOpsAsMathMLPair(const DerivedFromBinaryExpression auto& binexp) -> std::expected, gsl_lite::not_null>, std::string>; tinyxml2::XMLDocument& doc; }; -auto MathMLSerializer::GetOpsAsMathMLPair(const DerivedFromBinaryExpression auto& binexp) -> std::expected, gsl::not_null>, std::string> +auto MathMLSerializer::GetOpsAsMathMLPair(const DerivedFromBinaryExpression auto& binexp) -> std::expected, gsl_lite::not_null>, std::string> { MathMLSerializer& thisSerializer = *this; - return binexp.GetMostSigOp().Accept(thisSerializer).and_then([&binexp, &thisSerializer](gsl::not_null mostSigOp) { - return binexp.GetLeastSigOp().Accept(thisSerializer).transform([&mostSigOp](gsl::not_null leastSigOp) { + return binexp.GetMostSigOp().Accept(thisSerializer).and_then([&binexp, &thisSerializer](gsl_lite::not_null mostSigOp) { + return binexp.GetLeastSigOp().Accept(thisSerializer).transform([&mostSigOp](gsl_lite::not_null leastSigOp) { return std::pair { mostSigOp, leastSigOp }; }); }); diff --git a/io/src/MathMLSerializer.cpp b/io/src/MathMLSerializer.cpp index 05f967ec..7bdf6da9 100644 --- a/io/src/MathMLSerializer.cpp +++ b/io/src/MathMLSerializer.cpp @@ -33,14 +33,14 @@ auto MathMLSerializer::TypedVisit(const Real& real) -> RetT { tinyxml2::XMLElement* result = doc.NewElement("mn"); result->SetText(std::format("{:.5}", real.GetValue()).c_str()); - return gsl::not_null(result); + return gsl_lite::not_null(result); } auto MathMLSerializer::TypedVisit(const Imaginary&) -> RetT { tinyxml2::XMLElement* result = doc.NewElement("mi"); result->SetText("i"); - return gsl::not_null(result); + return gsl_lite::not_null(result); } auto MathMLSerializer::TypedVisit(const Matrix& matrix) -> RetT @@ -72,35 +72,35 @@ auto MathMLSerializer::TypedVisit(const Matrix& matrix) -> RetT mrow->InsertEndChild(table); mrow->InsertEndChild(closeBrace); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); } auto MathMLSerializer::TypedVisit(const Oasis::Pi&) -> RetT { tinyxml2::XMLElement* result = doc.NewElement("mi"); result->SetText("π"); - return gsl::not_null(result); + return gsl_lite::not_null(result); } auto MathMLSerializer::TypedVisit(const Oasis::EulerNumber&) -> RetT { tinyxml2::XMLElement* result = doc.NewElement("mi"); result->SetText("e"); - return gsl::not_null(result); + return gsl_lite::not_null(result); } auto MathMLSerializer::TypedVisit(const Variable& variable) -> RetT { tinyxml2::XMLElement* result = doc.NewElement("mi"); result->SetText(variable.GetName().c_str()); - return gsl::not_null(result); + return gsl_lite::not_null(result); } auto MathMLSerializer::TypedVisit(const Undefined&) -> RetT { tinyxml2::XMLElement* const mtext = doc.NewElement("mtext"); mtext->SetText("Undefined"); - return gsl::not_null(mtext); + return gsl_lite::not_null(mtext); } auto MathMLSerializer::TypedVisit(const Add<>& add) -> RetT @@ -122,7 +122,7 @@ auto MathMLSerializer::TypedVisit(const Add<>& add) -> RetT // remove last mo mrow->DeleteChild(mrow->LastChild()); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); } auto MathMLSerializer::TypedVisit(const Subtract<>& subtract) -> RetT @@ -165,7 +165,7 @@ auto MathMLSerializer::TypedVisit(const Subtract<>& subtract) -> RetT mrow->InsertEndChild(rightParen); } - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); }); } @@ -226,7 +226,7 @@ auto MathMLSerializer::TypedVisit(const Multiply<>& multiply) -> RetT } } - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); } auto MathMLSerializer::TypedVisit(const Divide<>& divide) -> RetT @@ -239,7 +239,7 @@ auto MathMLSerializer::TypedVisit(const Divide<>& divide) -> RetT mfrac->InsertEndChild(dividendElement); mfrac->InsertEndChild(divisorElement); - return gsl::not_null(mfrac); + return gsl_lite::not_null(mfrac); }); } @@ -272,7 +272,7 @@ auto MathMLSerializer::TypedVisit(const Exponent<>& exponent) -> RetT msup->InsertEndChild(powerElement); - return gsl::not_null(msup); + return gsl_lite::not_null(msup); }); } @@ -306,7 +306,7 @@ auto MathMLSerializer::TypedVisit(const Log<>& log) -> RetT mrow->InsertEndChild(argElement); mrow->InsertEndChild(rightParen); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); }); } @@ -333,14 +333,14 @@ auto MathMLSerializer::TypedVisit(const Negate& negate) -> RetT rightParen->SetText(")"); mrow->InsertEndChild(rightParen); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); } auto MathMLSerializer::TypedVisit(const Sine&) -> RetT { // mrow tinyxml2::XMLElement* const mrow = doc.NewElement("mrow"); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); } auto MathMLSerializer::TypedVisit(const Derivative<>& derivative) -> RetT @@ -379,7 +379,7 @@ auto MathMLSerializer::TypedVisit(const Derivative<>& derivative) -> RetT mrow->InsertEndChild(expElement); mrow->InsertEndChild(rightParen); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); }); } @@ -406,7 +406,7 @@ auto MathMLSerializer::TypedVisit(const Integral<>& integral) -> RetT mrow->InsertEndChild(expElement); mrow->InsertEndChild(dVar); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); }); } @@ -433,7 +433,7 @@ auto MathMLSerializer::TypedVisit(const Magnitude& magnitude) -> Ret rightParen->SetText("|"); mrow->InsertEndChild(rightParen); - return gsl::not_null(mrow); + return gsl_lite::not_null(mrow); } } \ No newline at end of file diff --git a/src/SimplifyVisitor.cpp b/src/SimplifyVisitor.cpp index ca3e6cbf..bf3de404 100644 --- a/src/SimplifyVisitor.cpp +++ b/src/SimplifyVisitor.cpp @@ -47,22 +47,22 @@ SimplifyOpts SimplifyVisitor::GetOptions() const auto SimplifyVisitor::TypedVisit(const Real& real) -> RetT { - return gsl::not_null { std::make_unique(real) }; + return gsl_lite::not_null { std::make_unique(real) }; } auto SimplifyVisitor::TypedVisit(const Imaginary&) -> RetT { - return gsl::not_null { std::make_unique() }; + return gsl_lite::not_null { std::make_unique() }; } auto SimplifyVisitor::TypedVisit(const Variable& variable) -> RetT { - return gsl::not_null { std::make_unique(variable) }; + return gsl_lite::not_null { std::make_unique(variable) }; } auto SimplifyVisitor::TypedVisit(const Undefined&) -> RetT { - return gsl::not_null { std::make_unique() }; + return gsl_lite::not_null { std::make_unique() }; } auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT @@ -95,12 +95,12 @@ auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT const Real& firstReal = realCase->GetMostSigOp(); const Real& secondReal = realCase->GetLeastSigOp(); - return gsl::not_null { std::make_unique(firstReal.GetValue() + secondReal.GetValue()) }; + return gsl_lite::not_null { std::make_unique(firstReal.GetValue() + secondReal.GetValue()) }; } if (auto zeroCase = RecursiveCast>(simplifiedAdd); zeroCase != nullptr) { if (zeroCase->GetMostSigOp().GetValue() == 0) { - return gsl::not_null { zeroCase->GetLeastSigOp().Generalize() }; + return gsl_lite::not_null { zeroCase->GetLeastSigOp().Generalize() }; } } @@ -112,7 +112,7 @@ auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT const Real& coefficient1 = likeTermsCase->GetMostSigOp().GetMostSigOp(); const Real& coefficient2 = likeTermsCase->GetLeastSigOp().GetMostSigOp(); - return gsl::not_null { std::make_unique>(Real(coefficient1.GetValue() + coefficient2.GetValue()), leftTerm) }; + return gsl_lite::not_null { std::make_unique>(Real(coefficient1.GetValue() + coefficient2.GetValue()), leftTerm) }; } } @@ -122,9 +122,9 @@ auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT const Oasis::IExpression auto& rightTerm = matrixCase->GetLeastSigOp(); if ((leftTerm.GetRows() == rightTerm.GetRows()) && (leftTerm.GetCols() == rightTerm.GetCols())) { - return gsl::not_null { std::make_unique(leftTerm.GetMatrix() + rightTerm.GetMatrix()) }; + return gsl_lite::not_null { std::make_unique(leftTerm.GetMatrix() + rightTerm.GetMatrix()) }; } else { - return gsl::not_null { std::make_unique>(leftTerm, rightTerm) }; + return gsl_lite::not_null { std::make_unique>(leftTerm, rightTerm) }; } } @@ -133,7 +133,7 @@ auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT if (logCase->GetMostSigOp().GetMostSigOp().Equals(logCase->GetLeastSigOp().GetMostSigOp())) { const IExpression auto& base = logCase->GetMostSigOp().GetMostSigOp(); const IExpression auto& argument = Multiply({ logCase->GetMostSigOp().GetLeastSigOp(), logCase->GetLeastSigOp().GetLeastSigOp() }); - return gsl::not_null { std::make_unique>(base, argument) }; + return gsl_lite::not_null { std::make_unique>(base, argument) }; } } @@ -146,7 +146,7 @@ auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT if (const auto likeTermsCase2 = RecursiveCast, Expression>>(simplifiedAdd); likeTermsCase2 != nullptr) { if (likeTermsCase2->GetMostSigOp().GetLeastSigOp().Equals(likeTermsCase2->GetLeastSigOp())) { const Real& coeffiecent = likeTermsCase2->GetMostSigOp().GetMostSigOp(); - return gsl::not_null { std::make_unique>(Real { coeffiecent.GetValue() + 1 }, likeTermsCase2->GetMostSigOp().GetLeastSigOp()) }; + return gsl_lite::not_null { std::make_unique>(Real { coeffiecent.GetValue() + 1 }, likeTermsCase2->GetMostSigOp().GetLeastSigOp()) }; } } @@ -324,10 +324,10 @@ auto SimplifyVisitor::TypedVisit(const Add<>& add) -> RetT } if (auto vec = BuildFromVector(avals); vec != nullptr) { - return gsl::not_null { std::move(vec) }; + return gsl_lite::not_null { std::move(vec) }; } - return gsl::not_null { simplifiedAdd.Copy() }; + return gsl_lite::not_null { simplifiedAdd.Copy() }; } auto SimplifyVisitor::TypedVisit(const Subtract<>& subtract) -> RetT @@ -361,12 +361,12 @@ auto SimplifyVisitor::TypedVisit(const Subtract<>& subtract) -> RetT const Real& minuend = realCase->GetMostSigOp(); const Real& subtrahend = realCase->GetLeastSigOp(); - return gsl::not_null { std::make_unique(minuend.GetValue() - subtrahend.GetValue()) }; + return gsl_lite::not_null { std::make_unique(minuend.GetValue() - subtrahend.GetValue()) }; } // x - x = 0 if (simplifiedMinuend->Equals(*simplifiedSubtrahend)) { - return gsl::not_null { std::make_unique(Real { 0.0 }) }; + return gsl_lite::not_null { std::make_unique(Real { 0.0 }) }; } if (auto matrixCase = RecursiveCast>(simplifiedSubtract); matrixCase != nullptr) { @@ -374,9 +374,9 @@ auto SimplifyVisitor::TypedVisit(const Subtract<>& subtract) -> RetT const Oasis::IExpression auto& rightTerm = matrixCase->GetLeastSigOp(); if ((leftTerm.GetRows() == rightTerm.GetRows()) && (leftTerm.GetCols() == leftTerm.GetCols())) { - return gsl::not_null { std::make_unique(leftTerm.GetMatrix() - rightTerm.GetMatrix()) }; + return gsl_lite::not_null { std::make_unique(leftTerm.GetMatrix() - rightTerm.GetMatrix()) }; } else { - return gsl::not_null { std::make_unique>(leftTerm, rightTerm) }; + return gsl_lite::not_null { std::make_unique>(leftTerm, rightTerm) }; } } @@ -409,7 +409,7 @@ auto SimplifyVisitor::TypedVisit(const Subtract<>& subtract) -> RetT if (logCase->GetMostSigOp().GetMostSigOp().Equals(logCase->GetLeastSigOp().GetMostSigOp())) { const IExpression auto& base = logCase->GetMostSigOp().GetMostSigOp(); const IExpression auto& argument = Divide({ logCase->GetMostSigOp().GetLeastSigOp(), logCase->GetLeastSigOp().GetLeastSigOp() }); - return gsl::not_null { std::make_unique>(base, argument) }; + return gsl_lite::not_null { std::make_unique>(base, argument) }; } } @@ -479,7 +479,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT const Real& multiplicand = onezerocase->GetMostSigOp(); const Expression& multiplier = onezerocase->GetLeastSigOp(); if (std::abs(multiplicand.GetValue()) <= EPSILON) { - return gsl::not_null { std::make_unique(Real { 0.0 }) }; + return gsl_lite::not_null { std::make_unique(Real { 0.0 }) }; } if (multiplicand.GetValue() == 1) { return multiplier.Accept(*this); @@ -488,11 +488,11 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (auto realCase = RecursiveCast>(simplifiedMultiply); realCase != nullptr) { const Real& multiplicand = realCase->GetMostSigOp(); const Real& multiplier = realCase->GetLeastSigOp(); - return gsl::not_null { std::make_unique(multiplicand.GetValue() * multiplier.GetValue()) }; + return gsl_lite::not_null { std::make_unique(multiplicand.GetValue() * multiplier.GetValue()) }; } if (auto ImgCase = RecursiveCast>(simplifiedMultiply); ImgCase != nullptr) { - return gsl::not_null { std::make_unique(-1.0) }; + return gsl_lite::not_null { std::make_unique(-1.0) }; } if (auto multCase = RecursiveCast>>(simplifiedMultiply); multCase != nullptr) { @@ -500,17 +500,17 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!m) { return m; } - return gsl::not_null { Divide { *(m.value()), (multCase->GetLeastSigOp().GetLeastSigOp()) }.Generalize() }; + return gsl_lite::not_null { Divide { *(m.value()), (multCase->GetLeastSigOp().GetLeastSigOp()) }.Generalize() }; } if (auto exprCase = RecursiveCast>(simplifiedMultiply); exprCase != nullptr) { if (exprCase->GetMostSigOp().Equals(exprCase->GetLeastSigOp())) { - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp(), Real { 2.0 }) }; + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp(), Real { 2.0 }) }; } } if (auto rMatrixCase = RecursiveCast>(simplifiedMultiply); rMatrixCase != nullptr) { - return gsl::not_null { std::make_unique(rMatrixCase->GetLeastSigOp().GetMatrix() * rMatrixCase->GetMostSigOp().GetValue()) }; + return gsl_lite::not_null { std::make_unique(rMatrixCase->GetLeastSigOp().GetMatrix() * rMatrixCase->GetMostSigOp().GetValue()) }; } if (auto matrixCase = RecursiveCast>(simplifiedMultiply); matrixCase != nullptr) { @@ -518,10 +518,10 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT const Oasis::IExpression auto& rightTerm = matrixCase->GetLeastSigOp(); if (leftTerm.GetCols() == rightTerm.GetRows()) { - return gsl::not_null { std::make_unique(leftTerm.GetMatrix() * rightTerm.GetMatrix()) }; + return gsl_lite::not_null { std::make_unique(leftTerm.GetMatrix() * rightTerm.GetMatrix()) }; } else { // ERROR: INVALID DIMENSION - return gsl::not_null { std::make_unique>(leftTerm, rightTerm) }; + return gsl_lite::not_null { std::make_unique>(leftTerm, rightTerm) }; } } @@ -551,7 +551,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp(), *(lsOp.value())) }; + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp(), *(lsOp.value())) }; } } @@ -562,7 +562,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp(), *(lsOp.value())) }; + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp(), *(lsOp.value())) }; } } @@ -572,7 +572,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetLeastSigOp(), *(lsOp.value())) }; + return gsl_lite::not_null { std::make_unique>(exprCase->GetLeastSigOp(), *(lsOp.value())) }; } } @@ -583,14 +583,14 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), *(lsOp.value())) }; + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), *(lsOp.value())) }; } } // a*x*x if (auto exprCase = RecursiveCast, Expression>>(simplifiedMultiply); exprCase != nullptr) { if (exprCase->GetMostSigOp().GetLeastSigOp().Equals(exprCase->GetLeastSigOp())) { - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), Exponent { exprCase->GetMostSigOp().GetLeastSigOp(), Real { 2.0 } }) }; } } @@ -606,7 +606,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(*(msOp.value()), *(lsOp.value())) }; + return gsl_lite::not_null { std::make_unique>(*(msOp.value()), *(lsOp.value())) }; } } @@ -617,7 +617,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), Exponent { exprCase->GetMostSigOp().GetLeastSigOp().GetMostSigOp(), *(lsOp.value()) }) }; } } @@ -629,7 +629,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp().GetMostSigOp(), Exponent { exprCase->GetMostSigOp().GetLeastSigOp(), *(lsOp.value()) }) }; } if (exprCase->GetMostSigOp().GetMostSigOp().Equals(exprCase->GetLeastSigOp().GetMostSigOp())) { @@ -637,7 +637,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>(exprCase->GetMostSigOp().GetLeastSigOp(), + return gsl_lite::not_null { std::make_unique>(exprCase->GetMostSigOp().GetLeastSigOp(), Exponent { exprCase->GetMostSigOp().GetMostSigOp(), *(lsOp.value()) }) }; } } @@ -653,7 +653,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsLsOp) { return lsLsOp; } - return gsl::not_null { std::make_unique>( + return gsl_lite::not_null { std::make_unique>( *(msOp.value()), Exponent { exprCase->GetMostSigOp().GetLeastSigOp(), *(lsLsOp.value()) }) }; } } @@ -668,7 +668,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsLsOp) { return lsLsOp; } - return gsl::not_null { std::make_unique>( + return gsl_lite::not_null { std::make_unique>( *(msOp.value()), Exponent { exprCase->GetMostSigOp().GetLeastSigOp(), *(lsLsOp.value()) }) }; } } @@ -683,7 +683,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsLsOp) { return lsLsOp; } - return gsl::not_null { std::make_unique>( + return gsl_lite::not_null { std::make_unique>( *(msOp.value()), Exponent { exprCase->GetLeastSigOp().GetLeastSigOp(), *(lsLsOp.value()) }) }; } @@ -696,7 +696,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>( + return gsl_lite::not_null { std::make_unique>( exprCase->GetMostSigOp().GetMostSigOp(), Exponent { exprCase->GetMostSigOp().GetLeastSigOp().GetMostSigOp(), *(lsOp.value()) }) }; @@ -714,7 +714,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT if (!lsOp) { return lsOp; } - return gsl::not_null { std::make_unique>( + return gsl_lite::not_null { std::make_unique>( *(msOp.value()), Exponent { exprCase->GetMostSigOp().GetLeastSigOp().GetMostSigOp(), *(lsOp.value()) }) }; @@ -840,7 +840,7 @@ auto SimplifyVisitor::TypedVisit(const Multiply<>& multiply) -> RetT } } - return gsl::not_null { BuildFromVector(vals) }; + return gsl_lite::not_null { BuildFromVector(vals) }; } auto SimplifyVisitor::TypedVisit(const Divide<>& divide) -> RetT @@ -872,7 +872,7 @@ auto SimplifyVisitor::TypedVisit(const Divide<>& divide) -> RetT if (auto realCase = RecursiveCast>(simplifiedDivide); realCase != nullptr) { const Real& dividend = realCase->GetMostSigOp(); const Real& divisor = realCase->GetLeastSigOp(); - return gsl::not_null { std::make_unique(dividend.GetValue() / divisor.GetValue()) }; + return gsl_lite::not_null { std::make_unique(dividend.GetValue() / divisor.GetValue()) }; } // log(a)/log(b)=log[b](a) @@ -880,7 +880,7 @@ auto SimplifyVisitor::TypedVisit(const Divide<>& divide) -> RetT if (logCase->GetMostSigOp().GetMostSigOp().Equals(logCase->GetLeastSigOp().GetMostSigOp())) { const IExpression auto& base = logCase->GetLeastSigOp().GetLeastSigOp(); const IExpression auto& argument = logCase->GetMostSigOp().GetLeastSigOp(); - return gsl::not_null { std::make_unique>(base, argument) }; + return gsl_lite::not_null { std::make_unique>(base, argument) }; } } // convert the terms in numerator and denominator into a vector to make manipulations easier @@ -1116,15 +1116,15 @@ auto SimplifyVisitor::TypedVisit(const Divide<>& divide) -> RetT // rebuild subtrees if (!dividend && divisor) - return gsl::not_null { Divide { Real { 1.0 }, *divisor }.Copy() }; + return gsl_lite::not_null { Divide { Real { 1.0 }, *divisor }.Copy() }; if (dividend && !divisor) - return gsl::not_null { dividend->Copy() }; + return gsl_lite::not_null { dividend->Copy() }; if (!dividend && !divisor) - return gsl::not_null { Real { 1.0 }.Copy() }; + return gsl_lite::not_null { Real { 1.0 }.Copy() }; - return gsl::not_null { Divide { *dividend, *divisor }.Copy() }; + return gsl_lite::not_null { Divide { *dividend, *divisor }.Copy() }; } auto SimplifyVisitor::TypedVisit(const Exponent<>& exponent) -> RetT @@ -1136,52 +1136,52 @@ auto SimplifyVisitor::TypedVisit(const Exponent<>& exponent) -> RetT const Real& power = zeroCase.GetLeastSigOp(); return power.GetValue() == 0.0; }, - [](const Exponent&, const void*) -> std::expected>, std::string_view> { - return gsl::make_not_null(std::make_unique(1.0)); + [](const Exponent&, const void*) -> std::expected>, std::string_view> { + return gsl_lite::make_not_null(std::make_unique(1.0)); }) .Case( [](const Exponent& zeroCase) -> bool { const Real& base = zeroCase.GetMostSigOp(); return base.GetValue() == 0.0; }, - [](const Exponent&, const void*) -> std::expected>, std::string_view> { - return gsl::make_not_null(std::make_unique(0.0)); + [](const Exponent&, const void*) -> std::expected>, std::string_view> { + return gsl_lite::make_not_null(std::make_unique(0.0)); }) .Case( [](const Exponent&) -> bool { return true; }, - [](const Exponent& realCase, const void*) -> std::expected>, std::string_view> { + [](const Exponent& realCase, const void*) -> std::expected>, std::string_view> { const Real& base = realCase.GetMostSigOp(); const Real& power = realCase.GetLeastSigOp(); - return gsl::make_not_null(std::make_unique(pow(base.GetValue(), power.GetValue()))); + return gsl_lite::make_not_null(std::make_unique(pow(base.GetValue(), power.GetValue()))); }) .Case( [](const Exponent& oneCase) -> bool { const Real& power = oneCase.GetLeastSigOp(); return power.GetValue() == 1.0; }, - [](const Exponent& oneCase, const void*) -> std::expected>, std::string_view> { - return gsl::make_not_null(oneCase.GetMostSigOp().Copy()); + [](const Exponent& oneCase, const void*) -> std::expected>, std::string_view> { + return gsl_lite::make_not_null(oneCase.GetMostSigOp().Copy()); }) .Case( [](const Exponent& oneCase) -> bool { const Real& base = oneCase.GetMostSigOp(); return base.GetValue() == 1.0; }, - [](const Exponent&, const void*) -> std::expected>, std::string_view> { - return gsl::make_not_null(std::make_unique(1.0)); + [](const Exponent&, const void*) -> std::expected>, std::string_view> { + return gsl_lite::make_not_null(std::make_unique(1.0)); }) .Case( [](const Exponent&) -> bool { return true; }, - [](const Exponent& ImgCase, const void*) -> std::expected>, std::string_view> { + [](const Exponent& ImgCase, const void*) -> std::expected>, std::string_view> { switch (const auto power = std::fmod((ImgCase.GetLeastSigOp()).GetValue(), 4); static_cast(power)) { case 0: - return gsl::make_not_null(std::make_unique(1)); + return gsl_lite::make_not_null(std::make_unique(1)); case 1: - return gsl::make_not_null(std::make_unique()); + return gsl_lite::make_not_null(std::make_unique()); case 2: - return gsl::make_not_null(std::make_unique(-1)); + return gsl_lite::make_not_null(std::make_unique(-1)); case 3: - return gsl::make_not_null(std::make_unique>(Imaginary {})); + return gsl_lite::make_not_null(std::make_unique>(Imaginary {})); default: return std::unexpected { "std::fmod returned an invalid value" }; } @@ -1190,31 +1190,31 @@ auto SimplifyVisitor::TypedVisit(const Exponent<>& exponent) -> RetT [](const Exponent, Real>& ImgCase) -> bool { return ImgCase.GetMostSigOp().GetMostSigOp().GetValue() < 0 && ImgCase.GetLeastSigOp().GetValue() == 0.5; }, - [](const Exponent, Real>& ImgCase, const void*) -> std::expected>, std::string_view> { + [](const Exponent, Real>& ImgCase, const void*) -> std::expected>, std::string_view> { Multiply mul { Multiply { Real { pow(std::abs(ImgCase.GetMostSigOp().GetMostSigOp().GetValue()), 0.5) }, Exponent { ImgCase.GetMostSigOp().GetLeastSigOp(), Real { 0.5 } } }, Imaginary {} }; - return gsl::make_not_null(mul.Copy()); + return gsl_lite::make_not_null(mul.Copy()); }) .Case( [](const Exponent, Expression>&) -> bool { return true; }, - [](const Exponent, Expression>& expExpCase, SimplifyVisitor* visitor) -> std::expected>, std::string_view> { + [](const Exponent, Expression>& expExpCase, SimplifyVisitor* visitor) -> std::expected>, std::string_view> { auto lsOp = Multiply { expExpCase.GetMostSigOp().GetLeastSigOp(), expExpCase.GetLeastSigOp() }.Accept(*visitor); if (!lsOp) { return lsOp; } Exponent exp { expExpCase.GetMostSigOp().GetMostSigOp(), *(lsOp.value()) }; - return gsl::make_not_null(exp.Copy()); + return gsl_lite::make_not_null(exp.Copy()); }) .Case( [](const Exponent>& logCase) -> bool { return logCase.GetMostSigOp().Equals(logCase.GetLeastSigOp().GetMostSigOp()); }, - [](const Exponent>& logCase, const void*) -> std::expected>, std::string_view> { - return gsl::make_not_null(logCase.GetLeastSigOp().GetLeastSigOp().Copy()); + [](const Exponent>& logCase, const void*) -> std::expected>, std::string_view> { + return gsl_lite::make_not_null(logCase.GetLeastSigOp().GetLeastSigOp().Copy()); }); auto mostSigOp = exponent.GetMostSigOp().Copy(); @@ -1241,7 +1241,7 @@ auto SimplifyVisitor::TypedVisit(const Exponent<>& exponent) -> RetT const Exponent simplifiedExponent { *simplifiedBase, *simplifiedPower }; auto matchResult = match_cast.Execute(simplifiedExponent, this).value(); - return gsl::not_null { matchResult ? std::move(matchResult) : std::move(simplifiedExponent.Copy()) }; + return gsl_lite::not_null { matchResult ? std::move(matchResult) : std::move(simplifiedExponent.Copy()) }; } auto SimplifyVisitor::TypedVisit(const Log<>& logIn) -> RetT @@ -1273,7 +1273,7 @@ auto SimplifyVisitor::TypedVisit(const Log<>& logIn) -> RetT if (const auto realBaseCase = RecursiveCast>(simplifiedLog); realBaseCase != nullptr) { if (const Real& b = realBaseCase->GetMostSigOp(); b.GetValue() <= 0.0 || b.GetValue() == 1) { - return gsl::not_null { std::make_unique() }; + return gsl_lite::not_null { std::make_unique() }; } } @@ -1281,11 +1281,11 @@ auto SimplifyVisitor::TypedVisit(const Log<>& logIn) -> RetT const Real& argument = realExponentCase->GetLeastSigOp(); if (argument.GetValue() <= 0.0) { - return gsl::not_null { std::make_unique() }; + return gsl_lite::not_null { std::make_unique() }; } if (argument.GetValue() == 1.0) { - return gsl::not_null { std::make_unique(0.0) }; + return gsl_lite::not_null { std::make_unique(0.0) }; } } @@ -1293,20 +1293,20 @@ auto SimplifyVisitor::TypedVisit(const Log<>& logIn) -> RetT const Real& base = realCase->GetMostSigOp(); const Real& argument = realCase->GetLeastSigOp(); - return gsl::not_null { std::make_unique(log2(argument.GetValue()) * (1 / log2(base.GetValue()))) }; + return gsl_lite::not_null { std::make_unique(log2(argument.GetValue()) * (1 / log2(base.GetValue()))) }; } // log(a) with a < 0 log(-a) if (auto negCase = RecursiveCast>(simplifiedLog); negCase != nullptr) { if (negCase->GetLeastSigOp().GetValue() < 0) { - return gsl::not_null { Add { Log { negCase->GetMostSigOp(), Real { -1 * negCase->GetLeastSigOp().GetValue() } }, Multiply { Imaginary {}, Pi {} } }.Generalize() }; + return gsl_lite::not_null { Add { Log { negCase->GetMostSigOp(), Real { -1 * negCase->GetLeastSigOp().GetValue() } }, Multiply { Imaginary {}, Pi {} } }.Generalize() }; } } // log[a](a) = 1 if (const auto sameCase = RecursiveCast>(simplifiedLog); sameCase != nullptr) { if (sameCase->leastSigOp->Equals(*sameCase->mostSigOp)) { - return gsl::not_null { Real { 1 }.Generalize() }; + return gsl_lite::not_null { Real { 1 }.Generalize() }; } } @@ -1318,7 +1318,7 @@ auto SimplifyVisitor::TypedVisit(const Log<>& logIn) -> RetT return Oasis::Multiply(factor, log).Accept(*this); } - return gsl::not_null { simplifiedLog.Copy() }; + return gsl_lite::not_null { simplifiedLog.Copy() }; } auto SimplifyVisitor::TypedVisit(const Negate& negate) -> RetT @@ -1385,7 +1385,7 @@ auto SimplifyVisitor::TypedVisit(const Derivative<>& derivative) -> RetT if (!s) { return s; } - return gsl::not_null { std::move(s).value()->Accept(*this).value() }; + return gsl_lite::not_null { std::move(s).value()->Accept(*this).value() }; } auto SimplifyVisitor::TypedVisit(const Integral<>& integral) -> RetT @@ -1413,22 +1413,22 @@ auto SimplifyVisitor::TypedVisit(const Integral<>& integral) -> RetT auto simplifiedDifferential = std::move(simplifiedLeastSigOpResult).value(); auto integrated = simplifiedIntegrand->Integrate(*simplifiedDifferential); - return gsl::not_null { std::move(integrated) }; + return gsl_lite::not_null { std::move(integrated) }; } auto SimplifyVisitor::TypedVisit(const Matrix& matrix) -> RetT { - return gsl::not_null { matrix.Copy() }; + return gsl_lite::not_null { matrix.Copy() }; } auto SimplifyVisitor::TypedVisit(const EulerNumber&) -> RetT { - return gsl::not_null { EulerNumber {}.Copy() }; + return gsl_lite::not_null { EulerNumber {}.Copy() }; } auto SimplifyVisitor::TypedVisit(const Pi&) -> RetT { - return gsl::not_null { Pi {}.Copy() }; + return gsl_lite::not_null { Pi {}.Copy() }; } auto SimplifyVisitor::TypedVisit(const Magnitude& magnitude) -> RetT @@ -1440,10 +1440,10 @@ auto SimplifyVisitor::TypedVisit(const Magnitude& magnitude) -> RetT auto simpOp = std::move(simplified).value(); if (auto realCase = RecursiveCast(*simpOp); realCase != nullptr) { double val = realCase->GetValue(); - return gsl::not_null { val >= 0.0 ? std::make_unique(val) : std::make_unique(-val) }; + return gsl_lite::not_null { val >= 0.0 ? std::make_unique(val) : std::make_unique(-val) }; } if (auto imgCase = RecursiveCast(*simpOp); imgCase != nullptr) { - return gsl::not_null { std::make_unique(1.0) }; + return gsl_lite::not_null { std::make_unique(1.0) }; } if (auto mulImgCase = RecursiveCast>(*simpOp); mulImgCase != nullptr) { return Magnitude { mulImgCase->GetMostSigOp() }.Accept(*this); @@ -1470,7 +1470,7 @@ auto SimplifyVisitor::TypedVisit(const Magnitude& magnitude) -> RetT return Exponent { Real { sum }, Real { 0.5 } }.Accept(*this); } - return gsl::not_null { magnitude.Generalize() }; + return gsl_lite::not_null { magnitude.Generalize() }; } } // Oasis \ No newline at end of file From f5c32d94859e021976d07b6d7394fa1d4c88299c Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 17 Mar 2026 20:36:57 +0000 Subject: [PATCH 2/3] [Actions] Format CMakeLists.txt --- CMakeLists.txt | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3650b81f..216d7e40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,15 +46,13 @@ if(OASIS_BUILD_WITH_COVERAGE) endif() endif() -# Fetches dependencies and integrates them into the project. -# Perhaps one day use Microsoft.GSL if -# https://github.com/microsoft/GSL/issues/991 gets addressed +# Fetches dependencies and integrates them into the project. Perhaps one day use +# Microsoft.GSL if https://github.com/microsoft/GSL/issues/991 gets addressed FetchContent_Declare( - GSL - GIT_REPOSITORY "https://github.com/gsl-lite/gsl-lite.git" - GIT_TAG v1.1.0 - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS CONFIG) + GSL + GIT_REPOSITORY "https://github.com/gsl-lite/gsl-lite.git" + GIT_TAG v1.1.0 + EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS CONFIG) FetchContent_MakeAvailable(GSL) @@ -70,11 +68,10 @@ add_subdirectory(src) if(OASIS_BUILD_TESTS) FetchContent_Declare( - Catch2 - GIT_REPOSITORY "https://github.com/catchorg/Catch2.git" - GIT_TAG v3.13.0 - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS CONFIG) + Catch2 + GIT_REPOSITORY "https://github.com/catchorg/Catch2.git" + GIT_TAG v3.13.0 + EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS CONFIG) FetchContent_MakeAvailable(Catch2) add_subdirectory(tests) @@ -87,20 +84,16 @@ endif() if(OASIS_BUILD_CLI) FetchContent_Declare( - fmt - GIT_REPOSITORY "https://github.com/fmtlib/fmt" - GIT_TAG 12.1.0 - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS CONFIG - ) + fmt + GIT_REPOSITORY "https://github.com/fmtlib/fmt" + GIT_TAG 12.1.0 + EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS CONFIG) FetchContent_Declare( - Isocline - GIT_REPOSITORY "https://github.com/daanx/isocline.git" - GIT_TAG v1.0.9 - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS CONFIG - ) + Isocline + GIT_REPOSITORY "https://github.com/daanx/isocline.git" + GIT_TAG v1.0.9 + EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS CONFIG) FetchContent_MakeAvailable(fmt Isocline) add_subdirectory(cli) From 8c7656c98fb13cb9992e85a71ca12dbdd8077bab Mon Sep 17 00:00:00 2001 From: Matthew McCall Date: Tue, 17 Mar 2026 16:39:03 -0400 Subject: [PATCH 3/3] Update GitHub Actions to use latest versions of actions/checkout and actions/setup-python --- .github/workflows/format-cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format-cmake.yml b/.github/workflows/format-cmake.yml index 91f7ec5b..275ff687 100644 --- a/.github/workflows/format-cmake.yml +++ b/.github/workflows/format-cmake.yml @@ -18,11 +18,11 @@ jobs: steps: # Checks out the repository. - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Set up Python environment - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.x'