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
Please find the builds exhibiting the problem see the build reports below.
- https://swiftpackageindex.com/builds/12CBF13A-F3EA-4345-AC46-4BB0858E2987
- https://swiftpackageindex.com/builds/2C40A249-33F3-4347-BFA5-99E3B084B9DA
There is no “Build Command” at the top of a build report.
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:
-
The build process successfully clones the Navigator repository to:
/Users/admin/builder/spi-builder-workspace/ -
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
- Create .spi.yml Fixes https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/3590 — committed to finestructure/Navigator by finestructure 2 years ago
The problem in your case is the
FeedKit.xcworkspacefile (which is essentially the same as an.xcodeprojfile).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.ymlfile. You had configured two different configs with no platform/swift version specifics.Thanks @finestructure opened a PR to move the
xcodeprojThe build command change has been deployed with builder 4.60.1.
FYI @byaruhaf , the problem with
xcodebuild -resolvePackageDependenciesin the Navigator project is the presence of theNavigatorDemo.xcodeprojat the top level. If you move it (and I presume the accompanying folderNavigatorDemo) into a subfolderExampleorDemo, the package resolution command succeeds.That’s an alternative workaround in case you don’t want to use an
.spi.ymlfile.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
checkoutand this seems to makexcodebuild -resolveDependenciesto fail. You can easily reproduce this by running:It produces the same error:
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
xcodeprojfile for the main library but rather only one for a demo,NavigatorDemo.xcodeproj. I believe adding aNavigator.xcodeprojshould also work.I’ve opened a PR to add an
.spi.ymlfile 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.