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

Infinite loop crash bug using Xcode 10. #533

Closed
hmlongco opened this issue Jun 6, 2018 · 4 comments
Closed

Infinite loop crash bug using Xcode 10. #533

hmlongco opened this issue Jun 6, 2018 · 4 comments

Comments

@hmlongco
Copy link

hmlongco commented Jun 6, 2018

What did you do?

Ran test using Nimble using Xcode 10 beta.

What did you expect to happen?

Test to succeed.

What actually happened instead?

Nimble code went into infinite loop on stringify(_ value: T?) -> String

public func stringify<T>(_ value: T?) -> String {
    guard let unboxed = value else {
        return "nil"
    }

}

The following change fixes the problem.

public func stringify<T>(_ value: T?) -> String {
    guard let unboxed = value else {
        return "nil"
    }

    if let value = value as? TestOutputStringConvertible {
        return value.testDescription
    }

    if let value = value as? CustomDebugStringConvertible {
        return value.debugDescription
    }

    return String(describing: unboxed)
}

Apparently something changed in how generic optionals are mapped to functions.

Environment

List the software versions you're using:

  • Quick: 1.3.0
  • Nimble: 7.1.1
  • Xcode Version: 10.0 beta
  • Swift Version: 4.1
  • Cocoapods: 1.5.0
@morganchen12
Copy link
Contributor

This was fixed by #532, but hasn't been released.

@hmlongco
Copy link
Author

hmlongco commented Jun 6, 2018

Missed it. Any idea when it will be merged?

@morganchen12
Copy link
Contributor

morganchen12 commented Jun 6, 2018

It'll be out in the 7.x release (see #536). I don't have an ETA for that, but it looks like @ikesyo plans on releasing soon.

@ikesyo
Copy link
Member

ikesyo commented Jun 6, 2018

v7.1.2 has been released 🚀

https://github.com/Quick/Nimble/releases/tag/v7.1.2

@ikesyo ikesyo closed this as completed Jun 6, 2018
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

No branches or pull requests

3 participants