SwiftPackageIndex-Server: Incorrect package data for Navigator by hmlongco

Package showing incorrect data

Please explain what data is incorrect and what you expected to see

iOS builds are failing yet i have tested them both for main and the tag 0.8.3

image

Please find the builds exhibiting the problem see the build reports below.

There is no “Build Command” at the top of a build report.

image

Looking at the build log, I can see the key error message:

the package at '/Users/admin/builder/Navigator' cannot be accessed (Error Domain=NSCocoaErrorDomain Code=260 "The folder "Navigator" doesn't exist."

The build is failing because Xcode is looking for the package in the wrong location. Here’s what’s happening:

  1. The build process successfully clones the Navigator repository to: /Users/admin/builder/spi-builder-workspace/

  2. However, Xcode is trying to resolve dependencies by looking in: /Users/admin/builder/Navigator

This appears to be a path mismatch issue. The build system has cloned the repository into a spi-builder-workspace subdirectory, but Xcode is looking in the parent directory without this subdirectory.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I’ve attempted to add a scheme to the .spi.yml file, but still no go. Also, I don’t have an .xcodeproj file for the package, except for an Example project.

The problem in your case is the FeedKit.xcworkspace file (which is essentially the same as an .xcodeproj file).

The issue in either case is that these files configure a local dependency on the package and that’s what seems to trip up xcodebuild -resolveDependencies.

@nmdias , I’ve opened a PR to fix your .spi.yml file. You had configured two different configs with no platform/swift version specifics.

Thanks @finestructure opened a PR to move the xcodeproj

The build command change has been deployed with builder 4.60.1.

FYI @byaruhaf , the problem with xcodebuild -resolvePackageDependencies in the Navigator project is the presence of the NavigatorDemo.xcodeproj at the top level. If you move it (and I presume the accompanying folder NavigatorDemo) into a subfolder Example or Demo, the package resolution command succeeds.

That’s an alternative workaround in case you don’t want to use an .spi.yml file.

Actually, let me reopen this, because the one thing I want to change is the reporting back in case we can’t determine the build command.

I’ll go ahead and close this. Please reopen it if there’s anything else we could possibly attempt here.

The problem is that we check the project out into a directory checkout and this seems to make xcodebuild -resolveDependencies to fail. You can easily reproduce this by running:

git clone https://github.com/hmlongco/Navigator checkout
cd checkout
xcodebuild -resolvePackageDependencies

It produces the same error:

❯ git clone https://github.com/hmlongco/Navigator checkout
Cloning into 'checkout'...
remote: Enumerating objects: 1557, done.
remote: Counting objects: 100% (1035/1035), done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 1557 (delta 861), reused 1012 (delta 846), pack-reused 522 (from 1)
Receiving objects: 100% (1557/1557), 2.65 MiB | 6.27 MiB/s, done.
Resolving deltas: 100% (1167/1167), done.
~/Downloads
❯ cd checkout
~/D/checkout on main
✦ ❯ xcodebuild -resolvePackageDependencies
Command line invocation:
    /Applications/Xcode-16.2.0.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph
the package at '/Users/sas/Downloads/Navigator' cannot be accessed (Error Domain=NSCocoaErrorDomain Code=260 "The folder “Navigator” doesn’t exist." UserInfo={NSUserStringVariant=(
    Folder
), NSFilePath=/Users/sas/Downloads/Navigator, NSURL=file:///Users/sas/Downloads/Navigator, NSUnderlyingError=0x60000150a3d0 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found"}})
2025-01-09 12:16:49.816 xcodebuild[85371:19671674] Writing error result bundle to /var/folders/nk/tlpts6bs799038htr6rx1xnc0000gn/T/ResultBundle_2025-09-01_12-16-0049.xcresult
xcodebuild: error: Could not resolve package dependencies:
  the package at '/Users/sas/Downloads/Navigator' cannot be accessed (Error Domain=NSCocoaErrorDomain Code=260 "The folder “Navigator” doesn’t exist." UserInfo={NSUserStringVariant=(

Unfortunately, changing the checkout directory name would be a major undertaking for our builder and it seems like this is really a bug in xcodebuild -resolveDependencies.

This does not happen universally but I believe I’ve seen an issue around this once before. It might be because your project doesn’t have an xcodeproj file for the main library but rather only one for a demo, NavigatorDemo.xcodeproj. I believe adding a Navigator.xcodeproj should also work.

I’ve opened a PR to add an .spi.yml file to your project. I think that’s the best we can do at this point unfortunately.

The reason the build command is missing is that we’re failing at an early stage where we determine which scheme to build, i.e. we’re still in the process of determining the build command.

We should indicate that fact instead of leaving the build command blank in that case.

Thanks for the report @byaruhaf, I’m looking into this.