Skip to content

Commit

Permalink
Update Dependencies and Fix Build Issue for Swift 6 (#27)
Browse files Browse the repository at this point in the history
# Update Dependencies and Fix Build Issue for Swift 6

## ⚙️ Release Notes 
- Update Dependencies and Fix Build Issue for Swift 6

### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored Sep 16, 2024
1 parent 384b6b8 commit 13ecfbc
Show file tree
Hide file tree
Showing 2 changed files with 386 additions and 374 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,18 @@ extension KeyedEncodingContainerProtocol {
}

public mutating func encode(_ value: Decimal, forKey key: Self.Key) throws {
var mutableValue = value
let stringValue = NSDecimalString(&mutableValue, Locale(identifier: "en_US"))
try encode(stringValue, forKey: key)
if #available(iOS 15.0, *) {
try encode(value.formatted(.number.locale(Locale(identifier: "en_US"))), forKey: key)
} else {
preconditionFailure(
"""
Temporary workaround for (133371820) (FB14696453).
https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes
As QDG doesn't support iOS 15 or earlier this precondition should never be called.
"""
)
}
}

public mutating func encodeIfPresent(_ value: Decimal?, forKey key: Self.Key) throws {
Expand Down
Loading

0 comments on commit 13ecfbc

Please sign in to comment.