Skip to content

Commit f2c39b2

Browse files
calvincestarigh-action-runner
authored andcommitted
fix: Multiline warning annotation line separator (#658)
1 parent e14099b commit f2c39b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Tests/ApolloCodegenTests/CodeGeneration/Templates/SelectionSet/SelectionSetTemplateTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12657,7 +12657,7 @@ class SelectionSetTemplateTests: XCTestCase {
1265712657
"""
1265812658

1265912659
let expected = """
12660-
#warning("Argument 'name' of field 'friend' is deprecated. Reason: 'Someone broke it.'"),
12660+
#warning("Argument 'name' of field 'friend' is deprecated. Reason: 'Someone broke it.'")
1266112661
#warning("Argument 'species' of field 'friend' is deprecated. Reason: 'Who cares?'")
1266212662
public static var __selections: [ApolloAPI.Selection] { [
1266312663
.field("__typename", String.self),
@@ -12707,7 +12707,7 @@ class SelectionSetTemplateTests: XCTestCase {
1270712707
"""
1270812708

1270912709
let expected = """
12710-
#warning("Argument 'name' of field 'friend' is deprecated. Reason: 'Someone broke it.'"),
12710+
#warning("Argument 'name' of field 'friend' is deprecated. Reason: 'Someone broke it.'")
1271112711
#warning("Argument 'species' of field 'species' is deprecated. Reason: 'Redundant'")
1271212712
public static var __selections: [ApolloAPI.Selection] { [
1271312713
.field("__typename", String.self),

apollo-ios-codegen/Sources/ApolloCodegenLib/Templates/SelectionSetTemplate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ struct SelectionSetTemplate {
295295
\(if: deprecatedArguments != nil && !deprecatedArguments.unsafelyUnwrapped.isEmpty, """
296296
\(deprecatedArguments.unsafelyUnwrapped.map { """
297297
\(field: $0.field, argument: $0.arg, warningReason: $0.reason)
298-
"""})
298+
"""}, separator: "\n")
299299
""")
300300
\(selectionsTemplate)
301301
"""

0 commit comments

Comments
 (0)