block / block/xcode-index-mcp

Allow specifying an explicit index store path in load_index (auto-discovery picks the wrong DerivedData for multiple working copies)

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
68
Forks
12
PR merge metrics
No merged PRs in 30d

Description

I work with the same project checked out in multiple working copies (different folders / git worktrees). Each working copy produces its own DerivedData directory under `~/Library/Developer/Xcode/DerivedData/-/`, so several `-*` folders coexist for what is effectively "the same project name."

Currently `load_index` only takes a `projectName`, and the Swift service's `findStorePath(projectName:)` resolves the store like this:

```
return contents
.filter { $0.lastPathComponent.contains(projectName) }
.map { $0.appendingPathComponent("Index.noindex/DataStore").path }
.first
```

Because it filters by name and takes `.first`, when multiple DerivedData folders match the project name the selection is non-deterministic — it depends on filesystem enumeration

Contributor guide

Open the contributing guide

Research direction

Start at the load_index entry point and the Swift service's findStorePath(projectName:) implementation. Trace how the project name currently selects a DerivedData store, then add support for an explicit index store path while preserving discovery when no path is supplied; done means callers can select the intended working copy deterministically.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.