Skip to content

Update Spectre to 0.10.0 for Xcode 12.5 #74

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

Merged
merged 1 commit into from
May 16, 2021

Conversation

yonaskolb
Copy link
Contributor

This updates Spectre to the recent 0.10.0 release. Without this packages that use both PathKit and Spectre can't update Spectre, and therefore are broken in Xcode 12.5

@kylef kylef merged commit e646d16 into kylef:master May 16, 2021
@yonaskolb
Copy link
Contributor Author

Thanks for the merge @kylef. Whenever you get a chance a new release would be great, so this is Xcode 12.5 compatible. Appreciate your work here.

@kylef
Copy link
Owner

kylef commented May 17, 2021

@yonaskolb have you tested this works in Xcode 12.5? I've seen some compilation failures locally with Swift 5.3 error: ambiguous use of 'expect' which also occur to on master so not introduced by this PR but likely just a change in Swift.

Just want to make sure that if this was released, it will work for you.

$ swift test
/home/kyle/Projects/kylef/PathKit/Tests/PathKitTests/PathKitSpec.swift:293:11: error: ambiguous use of 'expect'
      try expect {
          ^
...

@yonaskolb
Copy link
Contributor Author

@kylef, I hadn't tested PathKit on Xcode 12.5, but now that I do I see the same error. It seems Swift can't disambiguate between these 2 functions in Spectre. Is the bottom version required?

public func expect<T>( _ expression: @autoclosure @escaping () throws -> T?, file: String = #file, line: Int = #line, function: String = #function) -> Expectation<T> {
  return Expectation(file: file, line: line, function: function, expression: expression)
}

public func expect<T>(_ file: String = #file, line: Int = #line, function: String = #function, expression: @escaping () throws -> T?)  -> Expectation<T> {
  return Expectation(file: file, line: line, function: function, expression: expression)
}

@chrisballinger
Copy link
Contributor

@yonaskolb Here's a fix for that: 5c3fcb4

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.

3 participants