From 02a94c4a8abbae06a822173947d15efbb0fe2d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?furby=E2=84=A2?= Date: Fri, 15 Mar 2024 18:40:08 -0500 Subject: [PATCH] Fix include of makePyConstructor inside pxr ns. * Adjusts pxr namespace and Tf_MakePyConstructor not to wrap the import from within the opened scopes, but to instead open the namespaced scopes upon each individual independent iteration on BOOST_PP_ITERATE. * Without this fix we recieve the following: error: redundant #include of module 'Tf' appears within namespace 'Pixar::Tf_MakePyConstructor': #include BOOST_PP_FILENAME_1 ^ Tf/makePyConstructor.h:108:1: note: namespace 'Pixar::Tf_MakePyConstructor' begins here: namespace Tf_MakePyConstructor { --- Package.resolved | 4 ++-- Package.swift | 2 +- Sources/Tf/include/Tf/makePyConstructor.h | 17 +++++++++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Package.resolved b/Package.resolved index fea6f572a..ee72441fe 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/wabiverse/MetaverseKit", "state" : { - "revision" : "0b302a0a6866d711ea67fc1d44b1e3cb561b3d68", - "version" : "1.5.9" + "revision" : "ef077ac89695d23e7843e37305fc3bb5ea32205d", + "version" : "1.6.0" } }, { diff --git a/Package.swift b/Package.swift index a18435b30..dd04da33c 100644 --- a/Package.swift +++ b/Package.swift @@ -431,7 +431,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/wabiverse/MetaverseKit", from: "1.5.9"), + .package(url: "https://github.com/wabiverse/MetaverseKit", from: "1.6.0"), .package(url: "https://github.com/furby-tm/swift-bundler", from: "2.0.9"), .package(url: "https://github.com/apple/swift-log.git", from: "1.5.3"), .package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"), diff --git a/Sources/Tf/include/Tf/makePyConstructor.h b/Sources/Tf/include/Tf/makePyConstructor.h index 0b3ea7942..c925b272e 100644 --- a/Sources/Tf/include/Tf/makePyConstructor.h +++ b/Sources/Tf/include/Tf/makePyConstructor.h @@ -306,6 +306,10 @@ template struct InitCtorWithBackReference; template struct InitCtorWithVarArgs; template struct NewCtor; template struct NewCtorWithClassReference; +} // namespace Tf_MakePyConstructor + +PXR_NAMESPACE_CLOSE_SCOPE + #define BOOST_PP_ITERATION_LIMITS (0, TF_MAX_ARITY) #define BOOST_PP_FILENAME_1 "Tf/makePyConstructor.h" #include BOOST_PP_ITERATE() @@ -313,7 +317,7 @@ template struct NewCtorWithClassReference; #include "Tf/makePyConstructor.h" */ -} // namespace Tf_MakePyConstructor +PXR_NAMESPACE_OPEN_SCOPE template Tf_MakePyConstructor::InitVisitor> @@ -406,6 +410,11 @@ PXR_NAMESPACE_CLOSE_SCOPE #else // BOOST_PP_IS_ITERATING +PXR_NAMESPACE_OPEN_SCOPE + +namespace Tf_MakePyConstructor +{ + #define N BOOST_PP_ITERATION() #define SIGNATURE R(BOOST_PP_ENUM_PARAMS(N, A)) @@ -587,7 +596,7 @@ struct NewCtorWithClassReference : CtorBase { } }; -#endif +#endif /* N > 0 */ #undef N #undef SIGNATURE @@ -598,4 +607,8 @@ struct NewCtorWithClassReference : CtorBase { #undef ARG_TYPE_STR_A #undef EXTRACT_REQ_ARG_A +} // namespace Tf_MakePyConstructor + +PXR_NAMESPACE_CLOSE_SCOPE + #endif // BOOST_PP_IS_ITERATING