Skip to content

Commit 421f8f6

Browse files
committed
Add AttributeGraphVendor
1 parent e8a6a7a commit 421f8f6

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

Sources/OpenAttributeGraphShims/GraphShims.swift

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// GraphShims.swift
33
// OpenAttributeGraphShims
44

5+
public enum AttributeGraphVendor: String {
6+
case oag = "org.OpenSwiftUIProject.OpenAttributeGraph"
7+
case ag = "com.apple.AttributeGraph"
8+
case compute = "dev.incrematic.compute"
9+
}
10+
511
#if OPENATTRIBUTEGRAPH_COMPUTE
612

713
@_exported public import Compute
@@ -55,8 +61,12 @@ extension CachedValueOptions {
5561
public static var _1: CachedValueOptions = .unprefetched
5662
}
5763

64+
@available(*, deprecated, renamed: "attributeGraphVendor")
5865
public let attributeGraphEnabled = true
66+
public let attributeGraphVendor = AttributeGraphVendor.compute
67+
5968
#elseif OPENATTRIBUTEGRAPH_ATTRIBUTEGRAPH
69+
6070
@_exported public import AttributeGraph
6171
#if os(iOS) && !targetEnvironment(simulator)
6272
@_exported public import _AttributeGraphDeviceSwiftShims
@@ -67,11 +77,17 @@ public typealias OAGChangedValueFlags = AGChangedValueFlags
6777
public typealias OAGInputOptions = AGInputOptions
6878
public typealias OAGValue = AGValue
6979
public typealias OAGValueOptions = AGValueOptions
80+
81+
@available(*, deprecated, renamed: "attributeGraphVendor")
7082
public let attributeGraphEnabled = true
83+
public let attributeGraphVendor = AttributeGraphVendor.ag
84+
7185
#else
72-
@_exported import OpenAttributeGraph
7386

87+
@_exported import OpenAttributeGraph
88+
@available(*, deprecated, renamed: "attributeGraphVendor")
7489
public let attributeGraphEnabled = false
90+
public let attributeGraphVendor = AttributeGraphVendor.oag
7591
#endif
7692

7793
@available(*, deprecated, message: "swiftToolchainSupported is always true")

0 commit comments

Comments
 (0)