Repository navigation
[registrar] Import the framework for NSObject types used in method signatures. - #26418
Conversation
…gnatures.
The static registrar could emit method signatures referencing an Objective-C
type whose framework header wasn't imported in the generated code, which made
the generated code fail to compile:
registrar.h:266:27: error: expected a type
266 | -(void) registerWebView:(WKWebView *)p0;
| ^
This happened for a wrapper type from a binding project (Google.MobileAds'
GADMobileAds) with a method taking a WebKit.WKWebView parameter, where nothing
else in the app pulled in the WebKit framework: 'CheckNamespace' is only called
for the types the registrar iterates over, not for the types showing up in the
generated method signatures.
Fix this by calling 'CheckNamespace' in 'ToObjCParameterType' for platform
NSObject types, so that the corresponding '#import <Framework/Framework.h>' is
always emitted.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ddb2f938-9d62-4ccf-8ce8-70056d74178b
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
🚀 [CI Build #8c12572] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 205 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
The static registrar could emit method signatures referencing an Objective-C
type whose framework header wasn't imported in the generated code, which made
the generated code fail to compile:
This happened for a wrapper type from a binding project (Google.MobileAds'
GADMobileAds) with a method taking a WebKit.WKWebView parameter, where nothing
else in the app pulled in the WebKit framework: 'CheckNamespace' is only called
for the types the registrar iterates over, not for the types showing up in the
generated method signatures.
Fix this by calling 'CheckNamespace' in 'ToObjCParameterType' for platform
NSObject types, so that the corresponding '#import <Framework/Framework.h>' is
always emitted.
Copilot-Session: ddb2f938-9d62-4ccf-8ce8-70056d74178b