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
In some cases, clang outputs absolute paths to the dot-d files for objective-c source files. The bazel5 code that detects inclusion problems with Objective-C source files fails.
Feature requests: what underlying problem are you trying to solve with this feature?
One of my objective-c libraries has source files whose corresponding .d files contain absolute paths.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run bazel build -s //tests/ios/InclusionProblemRepro:LibraryA_objc
Expected result: build succeeds
Actual: Build fails with the error message: ERROR: /Users/amberdixon/Development/rules_ios/tests/ios/InclusionProblemRepro/BUILD.bazel:3:14: Compiling tests/ios/InclusionProblemRepro/Classes/Extensions/D.m failed: undeclared inclusion(s) in rule '//tests/ios/InclusionProblemRepro:LibraryA_objc': this rule is missing dependency declarations for the following files included by 'tests/ios/InclusionProblemRepro/Classes/Extensions/D.m': '/private/var/tmp/_bazel_amberdixon/bee3f665d317c886aa3a5be8caf5517a/sandbox/darwin-sandbox/12/execroot/build_bazel_rules_ios/tests/ios/InclusionProblemRepro/Classes/HeaderB.h' Target //tests/ios/InclusionProblemRepro:LibraryA_objc failed to build
Also note that the .d file for this source has an absolute path:
Description of the problem / feature request:
In some cases, clang outputs absolute paths to the dot-d files for objective-c source files. The bazel5 code that detects inclusion problems with Objective-C source files fails.
Feature requests: what underlying problem are you trying to solve with this feature?
One of my objective-c libraries has source files whose corresponding .d files contain absolute paths.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel build -s //tests/ios/InclusionProblemRepro:LibraryA_objcExpected result: build succeeds
Actual: Build fails with the error message:
ERROR: /Users/amberdixon/Development/rules_ios/tests/ios/InclusionProblemRepro/BUILD.bazel:3:14: Compiling tests/ios/InclusionProblemRepro/Classes/Extensions/D.m failed: undeclared inclusion(s) in rule '//tests/ios/InclusionProblemRepro:LibraryA_objc': this rule is missing dependency declarations for the following files included by 'tests/ios/InclusionProblemRepro/Classes/Extensions/D.m': '/private/var/tmp/_bazel_amberdixon/bee3f665d317c886aa3a5be8caf5517a/sandbox/darwin-sandbox/12/execroot/build_bazel_rules_ios/tests/ios/InclusionProblemRepro/Classes/HeaderB.h' Target //tests/ios/InclusionProblemRepro:LibraryA_objc failed to buildAlso note that the .d file for this source has an absolute path:
What operating system are you running Bazel on?
MacOS 11.6.1
What's the output of
bazel info release?development version
If
bazel info releasereturns "development version" or "(@Non-Git)", tell us how you built Bazel.Cherry-pick this commit (d966a0d) onto the 5.0.0-pre.20211011.2 bazel pre-release and rebuild bazel.
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD?~/Development/bazel (15a1b19085...) git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
git@github.com:bazelbuild/bazel.git
9108f9b
15a1b19085ee7c423a20d98590f980abf35a5805
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
No