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

Xcode 15: Foundation in iOS 17/macOS Sonoma has a new Predicate type which can conflict with Nimble's Predicate. #1061

Closed
younata opened this issue Jun 6, 2023 · 4 comments · Fixed by #1090

Comments

@younata
Copy link
Member

younata commented Jun 6, 2023

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.

@younata younata pinned this issue Jun 6, 2023
@skumor-foreflight
Copy link

Hello @younata , this seems to be a problem when running tests on visionOS

@younata
Copy link
Member Author

younata commented Sep 26, 2023

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.

@younata
Copy link
Member Author

younata commented Oct 3, 2023

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.

@younata
Copy link
Member Author

younata commented Oct 10, 2023

Nimble 13 is now released, with no changes made to the RC. I'll be unpinning this issue now.

@younata younata unpinned this issue Oct 10, 2023
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 a pull request may close this issue.

2 participants