From 462e8ef1a105a4b981ce1a97422239c5e70ad97b Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 26 Feb 2026 03:12:37 +0800 Subject: [PATCH 1/2] Bump version to 6.5.1 and enable apple-generic versioning - Update CURRENT_PROJECT_VERSION to 6.5.1 and enable VERSIONING_SYSTEM apple-generic in xcconfig - Guard manual version symbols with SWIFT_PACKAGE to avoid duplicate symbols with Xcode's auto-generated version object - Update version number from 6.0 to 6.5 in OAGVersion.c and tests --- Configs/OpenAttributeGraph.xcconfig | 6 ++---- Sources/OpenAttributeGraphCxx/Version/OAGVersion.c | 8 ++++++-- .../VersionCompatibilityTests.swift | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Configs/OpenAttributeGraph.xcconfig b/Configs/OpenAttributeGraph.xcconfig index 8b43e769..3d5ad337 100644 --- a/Configs/OpenAttributeGraph.xcconfig +++ b/Configs/OpenAttributeGraph.xcconfig @@ -34,11 +34,9 @@ SKIP_INSTALL = NO // MARK: - Framework GENERATE_INFOPLIST_FILE = YES -CURRENT_PROJECT_VERSION = 1 +CURRENT_PROJECT_VERSION = 6.5.1 MARKETING_VERSION = 1.0 -// OAGVersion.c defines OpenAttributeGraphVersionNumber/String manually, -// so disable Xcode's auto-generated version object to avoid duplicate symbols. -// VERSIONING_SYSTEM = apple-generic +VERSIONING_SYSTEM = apple-generic DYLIB_COMPATIBILITY_VERSION = 1 DYLIB_CURRENT_VERSION = 1 DYLIB_INSTALL_NAME_BASE = @rpath diff --git a/Sources/OpenAttributeGraphCxx/Version/OAGVersion.c b/Sources/OpenAttributeGraphCxx/Version/OAGVersion.c index ee0a727b..20722b22 100644 --- a/Sources/OpenAttributeGraphCxx/Version/OAGVersion.c +++ b/Sources/OpenAttributeGraphCxx/Version/OAGVersion.c @@ -6,11 +6,15 @@ #include #if OPENATTRIBUTEGRAPH_RELEASE == OPENATTRIBUTEGRAPH_RELEASE_2024 -double OpenAttributeGraphVersionNumber __attribute__ ((used)) = (double)6.0; -const unsigned char OpenAttributeGraphVersionString[] __attribute__ ((used)) = "@(#)PROAGRAM:OpenAttributeGraph PROJECT:OpenAttributeGraph-6.0.87\n"; +#if SWIFT_PACKAGE +double OpenAttributeGraphVersionNumber __attribute__ ((used)) = (double)6.5; +const unsigned char OpenAttributeGraphVersionString[] __attribute__ ((used)) = "@(#)PROAGRAM:OpenAttributeGraph PROJECT:OpenAttributeGraph-6.5.1\n"; +#endif const uint64_t OAGVersion = 0x2001e; #elif OPENATTRIBUTEGRAPH_RELEASE == OPENATTRIBUTEGRAPH_RELEASE_2021 +#if SWIFT_PACKAGE double OpenAttributeGraphVersionNumber __attribute__ ((used)) = (double)3.2; const unsigned char OpenAttributeGraphVersionString[] __attribute__ ((used)) = "@(#)PROAGRAM:OpenAttributeGraph PROJECT:OpenAttributeGraph-3.2.1\n"; +#endif const uint64_t OAGVersion = 0x20014; #endif diff --git a/Tests/OpenAttributeGraphCompatibilityTests/VersionCompatibilityTests.swift b/Tests/OpenAttributeGraphCompatibilityTests/VersionCompatibilityTests.swift index 6451131d..ddb1e7e4 100644 --- a/Tests/OpenAttributeGraphCompatibilityTests/VersionCompatibilityTests.swift +++ b/Tests/OpenAttributeGraphCompatibilityTests/VersionCompatibilityTests.swift @@ -16,7 +16,7 @@ struct VersionTests { #expect(OAGVersion == 0x20014) confirm() case OPENATTRIBUTEGRAPH_RELEASE_2024: - #expect(OpenAttributeGraphVersionNumber.isApproximatelyEqual(to: 6.0)) + #expect(OpenAttributeGraphVersionNumber.isApproximatelyEqual(to: 6.5)) #expect(OAGVersion == 0x2001e) confirm() default: From e64879088740dad793d16b7cd4173f0338115be4 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 26 Feb 2026 03:16:58 +0800 Subject: [PATCH 2/2] Optimize OpenAttributeGraphCompatibilityTests --- Package.resolved | 2 +- Package.swift | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index d2c72899..bdbc7a6d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "4c5beea729cad442a7b3ce4f6a65ebaf9550c006d5740ae2c3eccc8835547d65", + "originHash" : "956284da357dd33ed447f04ebcc26181bf2917ab63797f96df49660c25b7adcd", "pins" : [ { "identity" : "swift-numerics", diff --git a/Package.swift b/Package.swift index ccc93223..ef7c6c63 100644 --- a/Package.swift +++ b/Package.swift @@ -212,7 +212,7 @@ if libraryEvolutionCondition { // Either set OPENATTRIBUTEGRAPH_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build` sharedSwiftSettings.append(.unsafeFlags(["-enable-library-evolution", "-no-verify-emitted-module-interface"])) } -if !compatibilityTestCondition { +if !(compatibilityTestCondition && buildForDarwinPlatform) { sharedCSettings.append(.define("OPENATTRIBUTEGRAPH")) sharedCxxSettings.append(.define("OPENATTRIBUTEGRAPH")) sharedSwiftSettings.append(.define("OPENATTRIBUTEGRAPH")) @@ -358,7 +358,7 @@ let openAttributeGraphCompatibilityTestsTarget = Target.testTarget( name: "OpenAttributeGraphCompatibilityTests", dependencies: [ .product(name: "Numerics", package: "swift-numerics"), - ] + (compatibilityTestCondition ? [] : [.target(name: openAttributeGraphTarget.name)]), + ], exclude: ["README.md"], cSettings: sharedCSettings, cxxSettings: sharedCxxSettings, @@ -470,6 +470,9 @@ if computeCondition { setupDPFDependency() openAttributeGraphCompatibilityTestsTarget.addAGSettings() } else { + openAttributeGraphCompatibilityTestsTarget.dependencies.append( + .target(name: openAttributeGraphTarget.name) + ) package.targets += [ utilitiesTestsTarget, openAttributeGraphCxxTestsTarget,