You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bazel setup with 2 frameworks (Foo and Bar) and 3 objc classes (A, B, C)
Headers A and B are in Foo framework, Header C in Bar framework
Bar depends on Foo
Header C import Foo/A.h
Repro steps:
Build framework Bar bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
Ensure its compilable
Add skip_packaging = ["modulemap"] to Foo framework bazel file
Remove B.h and B.m references from BUILD file
Try building Bar again bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
Observe error C.m:3:9: fatal error: could not build module 'Foo' as rules still assume Foo exposes modulemap and should be imported as module, even if we clearly removed module. This happens because stale modulemap file is not removed and objc_library see it through search path -Fbazel-out/macos-arm64-applebin_macos-darwin_x86_64-dbg-ST-cd2b3b8d4835/bin/tests/ios/frameworks/modulemap/Foo
Run bazelisk clean
Try bulding Bar again bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
Setup:
Repro steps:
bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
skip_packaging = ["modulemap"]
to Foo framework bazel filebazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
C.m:3:9: fatal error: could not build module 'Foo'
as rules still assume Foo exposes modulemap and should be imported as module, even if we clearly removed module. This happens because stale modulemap file is not removed and objc_library see it through search path-Fbazel-out/macos-arm64-applebin_macos-darwin_x86_64-dbg-ST-cd2b3b8d4835/bin/tests/ios/frameworks/modulemap/Foo
bazelisk clean
bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
Repro project:
bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
6.
bazelisk clean; bazelisk build tests/ios/frameworks/modulemap:Bar --spawn_strategy=standalone
7. Observe no error
Related to issue that was fixed in #209. FYI @congt
The text was updated successfully, but these errors were encountered: