SwiftDigest
SwiftDigest copied to clipboard
Updates to prevent Swift 5.0 deprecation warnings
I'm using SwiftDigest in my own project; thank you! This PR is to remove some deprecation warnings that cropped up as a part of the Swift 5.0 update.
This does seem to be working properly for me, but I strongly advise some independent testing to be sure I didn't mess something up. 😆
Hi @cliss,
We tried importing your changes in our own PR on SPM support. This branch uses Xcode 11.2.1 with swift 5.1.2.
We did not included it because the following showed up:
- Still has deprecation warnings in
MD5DigestPerformanceTests.swift - Two tests are failing:
SwiftDigest/Tests/SwiftDigestTests/MD5DigestTests.swift:54: error: -[SwiftDigestTests.MD5DigestTests test4KBytes] : XCTAssertEqual failed: ("Optional(819bdd24c8fa9f88b855cb593603d0dc)") is not equal to ("Optional(7052292b1c02ae4b0b35fabca4fbd487)")
SwiftDigest/Tests/SwiftDigestTests/MD5DigestTests.swift:62: error: -[SwiftDigestTests.MD5DigestTests test4MBytes] : XCTAssertEqual failed: ("Optional(17b2895b94697b127abf91be59998e9f)") is not equal to ("Optional(f8a4ffa8b1c902f072338caa1e4482ce)")
It seems your changes are affecting the way the hash is computed, at least when using swift 5.1.2. We don't have the time to look into this so we are staying with the warnings, but we thought you should know since your implementation might be broken if you upgrade to swift 5.1.2/Xcode 11.2.1.
Best, Stefan