Xcode 15: Foundation in iOS 17/macOS Sonoma has a new `Predicate` type which can conflict with Nimble's `Predicate`.
younata opened this issue · comments
If you're running Xcode 15, and create a Nimble matcher in a file that also imports Foundation, you'll get a bunch of 'Predicate' is ambiguous for type lookup in this context
type build errors.
This can be fixed by disambiguating which Predicate
you're using - i.e. Nimble.Predicate
instead of simply Predicate
.
Edit: This can also be addressed with typealias Predicate = Nimble.Predicate
. Which works throughout the entire module.
If this is a large enough problem for people, we might will look into renaming the Predicate
API, or providing a typealias for the API.
Hello @younata , this seems to be a problem when running tests on visionOS
For those watching this issue: #1090 will rename Nimble's Predicate
type to Matcher
, with a typealias for backwards compatibility/adding a fixit to make upgrading easier (though, it'll spam you with deprecation warnings).
I'm open to names other than Matcher
for this rename; Matcher
was the name of the API that Predicate
replaced, and I don't want to confuse anyone. However, the old Matcher
API has been removed since Nimble 10, so that's not that much of an issue. As I state in the PR, my reasons for using Matcher
are a lack of creativity on my part + the fact that we still refer to predicates as matchers in the Nimble documentation. Please add comments to #1090 with a suggestion. I'll keep that PR open for a week until I merge it and release a beta of Nimble 13.
Nimble 13 RC 1 is available for use, which addresses this issue. Assuming there's no major changes needed, I'll release it as Nimble 13.
Nimble 13 is now released, with no changes made to the RC. I'll be unpinning this issue now.