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

[8/y] Fix wildcard arg matching for Obj-C param types #247

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

andrewchang-bird
Copy link
Contributor

@andrewchang-bird andrewchang-bird commented Dec 24, 2021

Stack:
πŸ“š #248 [9/y] Fix nested optional codegen
πŸ“š #247 ← [8/y] Fix wildcard arg matching for Obj-C param types
πŸ“š #246 [7/y] Fix stubbing nil values in Obj-C mocks
πŸ“š #254 [6/y] Update example projects
πŸ“š #253 [5/y] Improve support for configuring SPM Xcode projects
πŸ“š #252 [4/y] Show help message no mockable types are generated
πŸ“š #251 [3/y] Fix unavailable generic protocol mock initializer
πŸ“š #250 [2/y] Fix generator caching for multi-project setups
πŸ“š #249 [1/y] Optimize dependency graph traversal
πŸ“š #245 Replace SwiftPM with Swift Argument Parser

Dynamic mocking (introduced in 0.18) changed how Objective-C parameter types are faked for wildcard argument matching. To support Objective-C mocking, argument matchers for NSObjectProtocol parameters no longer create type facades that go through the resolution context thread, but instead create dynamic NSProxy doubles.

Dynamic type facades weren’t set up to be used from Swift; this change enables Swift to properly resolve the type facades.

Closes #233

@andrewchang-bird andrewchang-bird linked an issue Dec 24, 2021 that may be closed by this pull request
2 tasks
@andrewchang-bird andrewchang-bird added this to the Release 0.19 milestone Dec 24, 2021
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-objc-nil branch from 02586f8 to 40134ad Compare January 4, 2022 22:21
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-objc-parameters branch from 81d2134 to 8b03fb6 Compare January 4, 2022 22:21
@andrewchang-bird andrewchang-bird changed the title [2/x] Fix wildcard arg matching for Obj-C param types [8/y] Fix wildcard arg matching for Obj-C param types Jan 5, 2022
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-objc-nil branch from 40134ad to 8f243ee Compare January 6, 2022 08:18
Base automatically changed from dev/andrewchang-bird/fix-objc-nil to master January 6, 2022 09:35
Dynamic mocking (introduced in 0.18) changed how Objective-C parameter
types are faked for wildcard argument matching. To support Objective-C
mocking, argument matchers for `NSObjectProtocol` parameters no longer
create type facades that go through the resolution context thread, but
instead create dynamic `NSProxy` doubles.

Dynamic type facades weren’t set up to be used from Swift; this change
enables Swift to properly resolve the type facades.
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-objc-parameters branch from 8b03fb6 to 1bd6c0d Compare January 6, 2022 09:36
@andrewchang-bird andrewchang-bird merged commit d046f75 into master Jan 6, 2022
@andrewchang-bird andrewchang-bird deleted the dev/andrewchang-bird/fix-objc-parameters branch January 6, 2022 11:47
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.

NSInvalidArgumentException
2 participants