Skip to content

Commit ad7223a

Browse files
committed
Add more namespacing.
1 parent 09aab16 commit ad7223a

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Sources/ComposableArchitectureMacros/ReducerMacro.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,14 @@ extension ReducerMacro: MemberMacro {
369369
if !hasBody {
370370
var staticVarBody = ""
371371
if reducerTypeScopes.isEmpty {
372-
staticVarBody = "EmptyReducer<Self.State, Self.Action>"
372+
staticVarBody = "ComposableArchitecture.EmptyReducer<Self.State, Self.Action>"
373373
} else if reducerTypeScopes.count == 1 {
374374
staticVarBody = reducerTypeScopes[0]
375375
} else {
376376
for _ in 1...(reducerTypeScopes.count - 1) {
377-
staticVarBody.append("ReducerBuilder<Self.State, Self.Action>._Sequence<")
377+
staticVarBody.append(
378+
"ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>._Sequence<"
379+
)
378380
}
379381
staticVarBody.append(reducerTypeScopes[0])
380382
staticVarBody.append(", ")

Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
}
235235
236236
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
237-
static var body: EmptyReducer<Self.State, Self.Action> {
237+
static var body: ComposableArchitecture.EmptyReducer<Self.State, Self.Action> {
238238
239239
}
240240
@@ -302,7 +302,7 @@
302302
}
303303
304304
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
305-
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Activity>, ComposableArchitecture.Scope<Self.State, Self.Action, Timeline>>, ComposableArchitecture.Scope<Self.State, Self.Action, Tweet>> {
305+
static var body: ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Activity>, ComposableArchitecture.Scope<Self.State, Self.Action, Timeline>>, ComposableArchitecture.Scope<Self.State, Self.Action, Tweet>> {
306306
ComposableArchitecture.Scope(state: \Self.State.Cases.activity, action: \Self.Action.Cases.activity) {
307307
Activity()
308308
}
@@ -372,7 +372,7 @@
372372
}
373373
374374
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
375-
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Activity>, ComposableArchitecture.Scope<Self.State, Self.Action, Timeline>> {
375+
static var body: ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Activity>, ComposableArchitecture.Scope<Self.State, Self.Action, Timeline>> {
376376
ComposableArchitecture.Scope(state: \Self.State.Cases.activity, action: \Self.Action.Cases.activity) {
377377
Activity()
378378
}
@@ -498,7 +498,7 @@
498498
}
499499
500500
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
501-
static var body: EmptyReducer<Self.State, Self.Action> {
501+
static var body: ComposableArchitecture.EmptyReducer<Self.State, Self.Action> {
502502
503503
}
504504
@@ -561,7 +561,7 @@
561561
}
562562
563563
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
564-
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Counter>, ComposableArchitecture.Scope<Self.State, Self.Action, Counter>>, ComposableArchitecture.Scope<Self.State, Self.Action, Counter>> {
564+
static var body: ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Counter>, ComposableArchitecture.Scope<Self.State, Self.Action, Counter>>, ComposableArchitecture.Scope<Self.State, Self.Action, Counter>> {
565565
ComposableArchitecture.Scope(state: \Self.State.Cases.drillDown, action: \Self.Action.Cases.drillDown) {
566566
Counter()
567567
}

0 commit comments

Comments
 (0)