Make generated JSON coding key Sendable#87
Conversation
1ff7318 to
1b2c323
Compare
019f4b8 to
08574c6
Compare
1b2c323 to
a9cef3b
Compare
08574c6 to
92ab70f
Compare
a9cef3b to
0690561
Compare
92ab70f to
01e34a8
Compare
0690561 to
29a0e02
Compare
01e34a8 to
65f806c
Compare
29a0e02 to
673bb39
Compare
5678177 to
679b65c
Compare
673bb39 to
29722dd
Compare
679b65c to
d8af537
Compare
29722dd to
7c8db7f
Compare
d8af537 to
4f87743
Compare
4f87743 to
7392cb4
Compare
db98f08 to
157151b
Compare
7392cb4 to
e8efc29
Compare
157151b to
488079a
Compare
e8efc29 to
de91f40
Compare
488079a to
88ac844
Compare
| ]); | ||
|
|
||
| await normalizeGeneratedFile(output); | ||
| await normalizeGeneratedFile(output, (source) => { |
There was a problem hiding this comment.
This bit is a bit ugly, to avoid it silently failing in future I added a SHA check withQUICKTYPE_23_2_6_SWIFT_JSON_HELPER_SHA256 so we can detect change concretely in future. Ideally quicktype will provide better swift 6 support in future
88ac844 to
7000043
Compare
de91f40 to
0fb8d20
Compare
7000043 to
1168aca
Compare
0fb8d20 to
cc14713
Compare
| return `${source.slice(0, helperStart)}// MARK: - Encode/decode helpers | ||
|
|
||
| public final class JSONNull: Codable, Hashable, Sendable { | ||
|
|
||
| public static func == (lhs: JSONNull, rhs: JSONNull) -> Bool { | ||
| return true | ||
| } | ||
|
|
||
| public func hash(into hasher: inout Hasher) { | ||
| hasher.combine(0) | ||
| } | ||
|
|
||
| public init() {} |
There was a problem hiding this comment.
This code living in a JS file feels brittle. Could this live as a .swift file that we can lint/format and read as a file here instead?
There was a problem hiding this comment.
Agreed - I was being more accepting on the fact it exists in the generated models file so its all checked - but then its just duplicated unnecessarily
The script is updated now so that it replaces the code with a marker, and the code is actually just persistently stored in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/JSONAny.swift
831d87b to
c89f450
Compare
cc14713 to
f5f36ff
Compare
f5f36ff to
accb183
Compare
c89f450 to
1bf3275
Compare
9054752 to
fffc774
Compare
fffc774 to
1cb7220
Compare

What changes are you making?
attributionchanges are due to stale snapshots (need to fix CI for this check)chore(protocol): refresh UCP snapshot (chore(protocol): refresh UCP snapshot #202) added attribution to the schema files without re-generating the files
How to test
Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
platforms/swift/ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/CHANGELOG.mdplatforms/swift/README.md(major version only)Releasing a new Android version?
versionNameinplatforms/android/lib/build.gradleplatforms/android/CHANGELOG.mdplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.