added test case that broke with main, under sandbox mode and bazel 7 and arm64_simulator_use_device_deps feature turned on :
To repro locally, run bazel build //tests/ios/unit-test/test-imports-app:TestImports-App --config=ios --features apple.arm64_simulator_use_device_deps and it fails. But success if change .bazelversion to 6.4.0
The error is "unable to find header basic.h" which is the same issue with what our own repo has. Also this only break Objc side not swift side (probably because CcInfo is more used by objc_library?)
To fix above: use the compilation_context generated originally.
The original fix https://github.com/bazel-ios/rules_ios/pull/873 is missing fields inside compilation_context such as headers. So might as well use the original CcInfo collected, and only recreate the linking context.
BTW i believe the original PR aims to fix this kind of error in bazel 7:
ld: building for 'iOS-simulator', but linking in object file (/path/to/someframework.framework[arm64][2] built for 'iOS'
Which is the error we got if trying to just use the original CcInfo.
Update the test matrix to have sandbox mode for the tests for arm64_simulator_use_device_deps feature
What changed and why:
added test case that broke with main, under sandbox mode and bazel 7 and
arm64_simulator_use_device_deps
feature turned on : To repro locally, runbazel build //tests/ios/unit-test/test-imports-app:TestImports-App --config=ios --features apple.arm64_simulator_use_device_deps
and it fails. But success if change.bazelversion
to 6.4.0 The error is "unable to find headerbasic.h
" which is the same issue with what our own repo has. Also this only break Objc side not swift side (probably because CcInfo is more used by objc_library?)To fix above: use the compilation_context generated originally. The original fix https://github.com/bazel-ios/rules_ios/pull/873 is missing fields inside
compilation_context
such asheaders
. So might as well use the original CcInfo collected, and only recreate the linking context. BTW i believe the original PR aims to fix this kind of error in bazel 7:Which is the error we got if trying to just use the original CcInfo.
Update the test matrix to have sandbox mode for the tests for
arm64_simulator_use_device_deps
featureTests done: Without the change from https://github.com/bazel-ios/rules_ios/pull/903 some checks should still fail but the ones using
arm64_simulator_use_device_deps
should be green