# Strange errors from SourceKit-LSP in fresh Objective-C project

**URL:** <https://forums.swift.org/t/strange-errors-from-sourcekit-lsp-in-fresh-objective-c-project/80593>\
**Category:** SourceKit-LSP\
**Tags:** objective-c, sourcekit-lsp\
**Created:** [June 21, 2025, 9:45pm UTC](https://forums.swift.org/t/strange-errors-from-sourcekit-lsp-in-fresh-objective-c-project/80593 "2025-06-21T21:45:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [June 21, 2025, 9:45pm UTC](https://forums.swift.org/t/strange-errors-from-sourcekit-lsp-in-fresh-objective-c-project/80593/1 "2025-06-21T21:45:17Z")

</div>

In a mostly fresh objc project (no settings tweaked, only added a `Person` class) I get these strange errors at the very top of each `.m` file:

```swift
No such file or directory: '/Users/tanner/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'

Stat cache file '/Users/tanner/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-ba1d5608dbd73fcc092a45042755c403.sdkstatcache' not found

```

It looks like this:

 ![Screenshot 2025-06-21 at 4.41.28 PM](https://global.discourse-cdn.com/swift/original/3X/f/3/f3068b092d1d1054c0da8071e3a6a990c9eebaf5.png)  
 ![Screenshot 2025-06-21 at 4.41.37 PM](https://global.discourse-cdn.com/swift/original/3X/a/a/aa0109a4ff6653ef7537419448d1799323e8b348.png)

These aren't necessarily getting in the way of me doing any work, but they're annoying. Here's my generated `buildServer.json` if that helps:

```swift
{
	"name": "xcode build server",
	"version": "0.2",
	"bspVersion": "2.0",
	"languages": [
		"c",
		"cpp",
		"objective-c",
		"objective-cpp",
		"swift"
	],
	"argv": [
		"/opt/homebrew/bin/xcode-build-server"
	],
	"workspace": "/Users/tanner/Desktop/Objc-LSP-Testing/Objc-LSP-Testing.xcodeproj/project.xcworkspace",
	"build_root": "/Users/tanner/Library/Developer/Xcode/DerivedData/Objc-LSP-Testing-ccgdqdmwqixwuuagkwoccjnfdkht",
	"scheme": "Objc-LSP-Testing",
	"kind": "xcode"
}

```

What can I do to get rid of these errors?

---

<div class="post-metadata">

**Author:** ![bnbarham](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bnbarham/32/17708_2.png) [@bnbarham](https://forums.swift.org/u/bnbarham)\
**Post date:** [June 24, 2025, 12:47am UTC](https://forums.swift.org/t/strange-errors-from-sourcekit-lsp-in-fresh-objective-c-project/80593/2 "2025-06-24T00:47:12Z")

</div>

I assume you're not also seeing these in the build itself? IIUC xcode-build-server generates arguments based on the build log, so I'm fairly surprised you'd hit either of these two errors. To have them at all, you must have done a build, and thus I'd expect both files to exist.

@SolaWing have you seen this before?

---

<div class="post-metadata">

**Author:** ![SolaWing](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/solawing/32/21701_2.png) [@SolaWing](https://forums.swift.org/u/SolaWing)\
**Post date:** [June 25, 2025, 8:06am UTC](https://forums.swift.org/t/strange-errors-from-sourcekit-lsp-in-fresh-objective-c-project/80593/3 "2025-06-25T08:06:40Z")

</div>

No. may clean cache in ~/Library/Developer/Xcode/DerivedData, and do a full rebuild fix this problem?

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [July 3, 2025, 12:43am UTC](https://forums.swift.org/t/strange-errors-from-sourcekit-lsp-in-fresh-objective-c-project/80593/4 "2025-07-03T00:43:26Z")

</div>

The issue seems to be gone now in my demo project. I can't recall if I cleaned derived data between now and my post, but there is no entry for this project there, so maybe that was it. I might have done a build in Xcode first, but I don't remember now.

Thanks @bnbarham and @SolaWing for looking at this 🙏
