Skip to content

Commit abaacfc

Browse files
authored
Update OpenGraph_SPI to OpenGraphCxx (#142)
* Update OpenGraph_SPI to OpenGraphCxx * Change to OpenGraphCxx.Internal * Add OpenGraphCxx Private submodule * Add module.private.modulemap * Refactor all hpp headers * Update OpenGraphC module
1 parent b8c9558 commit abaacfc

File tree

105 files changed

+418
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+418
-298
lines changed

Package.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ if libraryEvolutionCondition {
136136

137137
let openGraphTarget = Target.target(
138138
name: "OpenGraph",
139-
dependencies: ["OpenGraph_SPI"],
139+
dependencies: ["OpenGraphCxx"],
140140
cSettings: sharedCSettings,
141141
swiftSettings: sharedSwiftSettings
142142
)
143143
// FIXME: Merge into one target
144144
// OpenGraph is a C++ & Swift mix target.
145145
// The SwiftPM support for such usage is still in progress.
146146
let openGraphSPITarget = Target.target(
147-
name: "OpenGraph_SPI",
147+
name: "OpenGraphCxx",
148148
cSettings: sharedCSettings + [
149149
.define("__COREFOUNDATION_FORSWIFTFOUNDATIONONLY__", to: "1", .when(platforms: .nonDarwinPlatforms)),
150150
],
@@ -170,14 +170,11 @@ let openGraphTestTarget = Target.testTarget(
170170
swiftSettings: sharedSwiftSettings
171171
)
172172
let openGraphSPITestTarget = Target.testTarget(
173-
name: "OpenGraph_SPITests",
173+
name: "OpenGraphCxxTests",
174174
dependencies: [
175-
"OpenGraph_SPI",
175+
"OpenGraphCxx",
176176
],
177177
exclude: ["README.md"],
178-
cSettings: sharedCSettings + [
179-
.headerSearchPath("../../Sources/OpenGraph_SPI"),
180-
],
181178
swiftSettings: sharedSwiftSettings + [.interoperabilityMode(.Cxx)]
182179
)
183180
let openGraphShimsTestTarget = Target.testTarget(
@@ -204,8 +201,8 @@ let openGraphCompatibilityTestTarget = Target.testTarget(
204201
let package = Package(
205202
name: "OpenGraph",
206203
products: [
207-
.library(name: "OpenGraph", type: .dynamic, targets: ["OpenGraph", "OpenGraph_SPI"]),
208-
.library(name: "OpenGraphShims", type: .dynamic, targets: ["OpenGraph", "OpenGraph_SPI", "OpenGraphShims"]),
204+
.library(name: "OpenGraph", type: .dynamic, targets: ["OpenGraph", "OpenGraphCxx"]),
205+
.library(name: "OpenGraphShims", type: .dynamic, targets: ["OpenGraph", "OpenGraphCxx", "OpenGraphShims"]),
209206
],
210207
dependencies: [
211208
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The current suggested toolchain to build the project is Swift 6.1 / Xcode 16.3.
3131

3232
## Credits
3333

34-
OpenGraph_SPI's Data, Graph, Vector and more is modified based on [Compute](https://github.com/jcmosc/Compute)'s implementations.
34+
OpenGraphCxx's Data, Graph, Vector and more is modified based on [Compute](https://github.com/jcmosc/Compute)'s implementations.
3535

3636
## License
3737

Scripts/gen_ag_interface_template.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ swift build -c release -Xswiftc -emit-module-interface -Xswiftc -enable-library-
1414
cp .build/release/Modules/OpenGraph.swiftinterface ./template.swiftinterface
1515

1616
sed -i '' '1,4d' ./template.swiftinterface
17-
sed -i '' 's/@_exported public import OpenGraph_SPI/@_exported public import AttributeGraph/g' ./template.swiftinterface
18-
sed -i '' 's/OpenGraph_SPI\.//g' ./template.swiftinterface
17+
sed -i '' 's/@_exported public import OpenGraphCxx/@_exported public import AttributeGraph/g' ./template.swiftinterface
18+
sed -i '' 's/OpenGraphCxx\.//g' ./template.swiftinterface
1919
sed -i '' 's/OpenGraph/AttributeGraph/g' ./template.swiftinterface
2020
sed -i '' 's/OG/AG/g' ./template.swiftinterface
2121

Sources/OpenGraph/Attribute/Attribute/AnyAttribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: API complete
77

8-
public import OpenGraph_SPI
8+
public import OpenGraphCxx
99

1010
extension AnyAttribute {
1111
public typealias Flags = OGAttributeTypeFlags

Sources/OpenGraph/Attribute/Attribute/Attribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
public import OpenGraph_SPI
1+
public import OpenGraphCxx
22

33
@frozen
44
@propertyWrapper

Sources/OpenGraph/Attribute/Body/AttributeBody.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
public import OpenGraph_SPI
8+
public import OpenGraphCxx
99

1010
public protocol _AttributeBody {
1111
static func _destroySelf(_ pointer: UnsafeMutableRawPointer)

Sources/OpenGraph/Attribute/Rule/Rule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
public import OpenGraph_SPI
8+
public import OpenGraphCxx
99

1010
public protocol Rule: _AttributeBody {
1111
associatedtype Value

Sources/OpenGraph/Attribute/Rule/StatefulRule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
public import OpenGraph_SPI
8+
public import OpenGraphCxx
99

1010
public protocol StatefulRule: _AttributeBody {
1111
associatedtype Value

Sources/OpenGraph/Attribute/RuleContext/AnyRuleContext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
public import OpenGraph_SPI
8+
public import OpenGraphCxx
99

1010
@frozen
1111
public struct AnyRuleContext: Equatable {

Sources/OpenGraph/Attribute/RuleContext/RuleContext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
public import OpenGraph_SPI
8+
public import OpenGraphCxx
99

1010
@frozen
1111
public struct RuleContext<Value>: Equatable {

0 commit comments

Comments
 (0)