Skip to content

Commit 1821426

Browse files
authored
Force generated key to be nonisolated. (#444)
1 parent f805528 commit 1821426

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Sources/DependenciesMacrosPlugin/DependencyEntryMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extension DependencyEntryMacro: PeerMacro {
125125

126126
let body = members.joined(separator: "\n")
127127
let keyDecl: DeclSyntax = """
128-
private enum \(keyName): Dependencies.\(raw: conformance) {
128+
private nonisolated enum \(keyName): Dependencies.\(raw: conformance) {
129129
\(raw: body)
130130
}
131131
"""

Tests/DependenciesMacrosPluginTests/DependencyEntryMacroTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class DependencyEntryMacroTests: BaseTestCase {
3333
}
3434
}
3535
36-
private enum __Key_client: Dependencies.DependencyKey {
36+
private nonisolated enum __Key_client: Dependencies.DependencyKey {
3737
@DependenciesMacros._DependencyEntryDefaultValue static var liveValue = Client.live
3838
@DependenciesMacros._DependencyEntryDefaultValue static var testValue = Client.test
3939
}
@@ -62,7 +62,7 @@ final class DependencyEntryMacroTests: BaseTestCase {
6262
}
6363
}
6464
65-
private enum __Key_client: Dependencies.DependencyKey {
65+
private nonisolated enum __Key_client: Dependencies.DependencyKey {
6666
@DependenciesMacros._DependencyEntryDefaultValue static var liveValue = Client.live
6767
@DependenciesMacros._DependencyEntryDefaultValue static var previewValue = Client.preview
6868
@DependenciesMacros._DependencyEntryDefaultValue static var testValue = Client.test
@@ -92,7 +92,7 @@ final class DependencyEntryMacroTests: BaseTestCase {
9292
}
9393
}
9494
95-
private enum __Key_client: Dependencies.TestDependencyKey {
95+
private nonisolated enum __Key_client: Dependencies.TestDependencyKey {
9696
@DependenciesMacros._DependencyEntryDefaultValue static var previewValue = Client.preview
9797
@DependenciesMacros._DependencyEntryDefaultValue static var testValue = Client.test
9898
}
@@ -121,7 +121,7 @@ final class DependencyEntryMacroTests: BaseTestCase {
121121
}
122122
}
123123
124-
private enum __Key_client: Dependencies.TestDependencyKey {
124+
private nonisolated enum __Key_client: Dependencies.TestDependencyKey {
125125
@DependenciesMacros._DependencyEntryDefaultValue static var testValue = Client.test
126126
}
127127
}
@@ -149,7 +149,7 @@ final class DependencyEntryMacroTests: BaseTestCase {
149149
}
150150
}
151151
152-
private enum __Key_client: Dependencies.DependencyKey {
152+
private nonisolated enum __Key_client: Dependencies.DependencyKey {
153153
typealias Value = Client
154154
static var liveValue: Value {
155155
Client.live
@@ -242,7 +242,7 @@ final class DependencyEntryMacroTests: BaseTestCase {
242242
}
243243
}
244244
245-
private enum __Key_client: Dependencies.DependencyKey {
245+
private nonisolated enum __Key_client: Dependencies.DependencyKey {
246246
typealias Value = Client
247247
static var liveValue: Value {
248248
Client.live

0 commit comments

Comments
 (0)