Disable nullable-to-nonnull-conversion on ExecuTorch (#19407)#19407
Disable nullable-to-nonnull-conversion on ExecuTorch (#19407)#19407chatura-atapattu wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19407
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 3 Pending, 1 Unrelated FailureAs of commit 2aa8174 with merge base 29761c8 ( NEW FAILURE - The following job has failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@chatura-atapattu has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104463212. |
735a5c6 to
9444c1f
Compare
Summary:
On the Xcode 26.4 compiler upgrade, we error on:
```
fbsource//xplat/executorch/extension/apple:ExecuTorch (objcxx_compile ExecuTorch/Exported/ExecuTorchModule.mm (pic))
Local command returned non-zero exit code 1
Reproduce locally: `env -C "$(buck2 root --kind project)" -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/fbsource/32bf73e24dec3a3 ...<omitted>... tion___0__/output_artifacts/__dep_files_intermediaries__/ExecuTorch/Exported/ExecuTorchModule.mm.pic (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
clang++: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
xplat/executorch/extension/apple/ExecuTorch/Exported/ExecuTorchModule.mm:317:47: error: implicit conversion from nullable pointer 'NS_RETURNS_INNER_POINTER const char *' to non-nullable pointer type 'const char * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion]
317 | const auto errorCode = _module->load_method(methodName.UTF8String);
| ^```
Disable this error.
Differential Revision: D104463212
Summary:
On the Xcode 26.4 compiler upgrade, we error on:
```
fbsource//xplat/executorch/extension/apple:ExecuTorch (objcxx_compile ExecuTorch/Exported/ExecuTorchModule.mm (pic))
Local command returned non-zero exit code 1
Reproduce locally: `env -C "$(buck2 root --kind project)" -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/fbsource/32bf73e24dec3a3 ...<omitted>... tion___0__/output_artifacts/__dep_files_intermediaries__/ExecuTorch/Exported/ExecuTorchModule.mm.pic (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
clang++: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
xplat/executorch/extension/apple/ExecuTorch/Exported/ExecuTorchModule.mm:317:47: error: implicit conversion from nullable pointer 'NS_RETURNS_INNER_POINTER const char *' to non-nullable pointer type 'const char * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion]
317 | const auto errorCode = _module->load_method(methodName.UTF8String);
| ^```
Disable this error.
Differential Revision: D104463212
9444c1f to
2aa8174
Compare
|
@pytorchbot label "release notes: none" |
|
Heads up: #19335 appears to address the same Xcode 26.4 issue with a different approach (inline |
Yeah, this was one of the first solutions I got too generated by Claude. Wasn't sure whether we really wanted to return an empty string here, which in the future will likely be taken as intended behavior, vs the diagnostic push/pop that would warrant investigating further to fix the API and why its empty in the first place. Will mention that in the diff, but in the end, both options get me my desired end state, so happy to go with either. |
|
One thing worth flagging on the pragma approach: those C++ methods take |
|
I'm not much of a C++ expert, so I'm happy to defer to owners of the codebase. Will close this pull request and look to the other change. |
Summary:
On the Xcode 26.4 compiler upgrade, we error on: