Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to prevent Swift 5.0 deprecation warnings #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cliss
Copy link

@cliss cliss commented Apr 2, 2019

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. 😆

@stefanhp
Copy link

stefanhp commented Nov 26, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants