-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix import_middleman broken with Bazel 7 + sandbox mode #910
Merged
+16
−16
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gyfelton
changed the title
Fix import_middleman broken with Bazel 7
Fix import_middleman broken with Bazel 7 (take 2)
Aug 30, 2024
gyfelton
commented
Aug 30, 2024
@@ -1,9 +1,12 @@ | |||
import Foundation | |||
import SomeFramework | |||
import Basic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this still work with bazel 7 probably because swift compile does not depend on CcInfo
gyfelton
changed the title
Fix import_middleman broken with Bazel 7 (take 2)
Fix import_middleman broken with Bazel 7 + sandbox mode (take 2)
Aug 30, 2024
gyfelton
force-pushed
the
yuanfeng/fix-bazel7-import-middleman
branch
from
August 31, 2024 03:21
3073bd1
to
b767843
Compare
luispadron
reviewed
Sep 3, 2024
luispadron
approved these changes
Sep 3, 2024
luispadron
changed the title
Fix import_middleman broken with Bazel 7 + sandbox mode (take 2)
Fix import_middleman broken with Bazel 7 + sandbox mode
Sep 3, 2024
thiagohmcruz
approved these changes
Sep 3, 2024
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
gyfelton
force-pushed
the
yuanfeng/fix-bazel7-import-middleman
branch
from
September 3, 2024 17:35
b767843
to
0c95c65
Compare
luispadron
reviewed
Sep 3, 2024
luispadron
reviewed
Sep 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, 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.0The 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 Fix import_middleman in Bazel 7 #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.
3. Update the test matrix to have sandbox mode for the tests for
arm64_simulator_use_device_deps
featureTests done:
Without the change from #903 some checks should still fail but the ones using
arm64_simulator_use_device_deps
should be green