Fix nullable pointer errors in ExecuTorchModule.mm#19241
Fix nullable pointer errors in ExecuTorchModule.mm#19241keoskate wants to merge 1 commit intopytorch:mainfrom
Conversation
Summary: NSString.UTF8String returns a nullable pointer (const char * _Nullable), but the ExecuTorch C++ Module methods expect non-nullable const char *. This causes 14 compilation errors (7 call sites × 2 architectures) that block downstream iOS test targets from building, including TWAppCoordinatorTests for Oculus Twilight. The fix adds the idiomatic Objective-C null-coalescing operator (`?: ""`) at each call site. Since the methodName parameters are already non-null NSString *, UTF8String will never actually return null in practice - this just satisfies the compiler's nullability checker. Differential Revision: D103190695
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19241
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Unrelated FailuresAs of commit a0ba4ec with merge base 94d2881 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@keoskate has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103190695. |
This PR needs a
|
Summary:
NSString.UTF8String returns a nullable pointer (const char * _Nullable), but the ExecuTorch C++ Module methods expect non-nullable const char *. This causes 14 compilation errors (7 call sites × 2 architectures) that block downstream iOS test targets from building.
The fix adds the idiomatic Objective-C null-coalescing operator (
?: "") at each call site. Since the methodName parameters are already non-null NSString *, UTF8String will never actually return null in practice - this just satisfies the compiler's nullability checker.Differential Revision: D103190695