MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Bug: Indexing fails when using VFS overlays

Open
#2,374 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
626
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Description

We recently updated rules_xcodeproj from 1.5.1 to 1.8.1 and started seeing errors in Xcode's background indexer.

image image

The Index Build tasks are ok, but the background indexer (the one when you open/edit files) is failing to find other modules.

We don't use rules_ios, just rules_apple and rules_swift.

I did manage to set up a repro here.

Reproduction steps

Please clone https://github.com/andre-alves/xcodeproj_indexing_error_repro and do these steps:

bazelisk run //BazelSample:BazelSampleXcodeProj
open BazelSample/BazelSample.xcodeproj
Do nothing, just wait for all Index Build tasks to finish.
When BazelSample is Ready, open DrinkDiscoveryInteractor.swift
Check the background indexing logs.

Tested with Xcode 14.3.1 and 14.1

Expected behavior

Expected no error logs in Xcode's background indexer.

rules_xcodeproj version

1.8.1

Xcode version

14.3.1

Bazel version

6.2.1

rules_apple version

2.5.0

rules_swift version

1.9.1

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by cloning the linked xcodeproj_indexing_error_repro repository and running bazelisk run //BazelSample:BazelSampleXcodeProj, then open the generated project and wait for Index Build tasks to finish. Open DrinkDiscoveryInteractor.swift and inspect the background indexing logs under the stated Xcode, Bazel, rules_apple, and rules_swift versions; done means the background indexer reports no errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.