Can't access some compiler source files in Xcode

I am unable to find files such as Pattern.h and DiagnosticsSema.def in Xcode after building the Swift project.

I cloned, built, and opened the Swift project like this:

mkdir -p swift-project/swift
cd swift-project/swift
git clone .
utils/update-checkout --clone
sccache --start-server
utils/build-script --skip-build-benchmarks \
  --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "x86_64" \
  --cmake-c-launcher="$(which sccache)" --cmake-cxx-launcher="$(which sccache)" \
  --release-debuginfo --debug-swift \
xed ../build/Xcode-RelWithDebInfoAssert+swift-DebugAssert/swift-macosx-x86_64/Swift.xcodeproj/

Then I let Xcode automatically create schemes, when prompted, and wait for indexing to finish.

My environment:

macOS 10.15.6 (19G2021)
Xcode 12.2 beta (12B5018i)
CMake 3.18.2
Python 3.8.5
Ninja 1.10.1
sccache 0.2.13

I remember having the same issue, although I was able to access the file indirectly (for example, right clicking a diagnostic somewhere and navigating to the file). I didn’t manage to figure out what was causing it and later I switched to Ninja builds + VSCode, so not sure what’s causing it.

Terms of Service

Privacy Policy

Cookie Policy