Hive Hive
Sign in

Failure when multiple projects exist

GitHub issue · Open

Metadata
Source
tuist/once #258
Updated
Sep 3, 2026
Details

Problem

Once cannot inspect an Xcode repository without creating once.toml when the repository contains multiple .xcodeproj files.

This conflicts with the documented zero-manifest adoption flow for existing Xcode projects.

Environment

  • Once 0.50.0
  • macOS
  • Xcode 26.5

Reproduction

Given a repository containing:

  • App.xcodeproj
  • App.xcworkspace
  • Several nested demo/tool .xcodeproj files

Run:

once query targets
Once fails with:
$ once query targets
2026-09-03T18:11:26.206696Z ERROR once: session failed session_id=01a06877-ec3e-74e0-b389-9de79a390771 error=loading graph
once: evaluation error in xcode:
target kind resolver failed for `xcode`: Traceback (most recent call last):
File <builtin>, in <module>
* once//modules/all.star:18623, in _xcode_workspace_resolver
entry_path = _xcode_project_path(ctx)
* once//modules/all.star:15294, in _xcode_project_path
fail(ctx["label"]["id"] + ": multiple Xcode projects found; set the `project`...
error: fail: xcode: multiple Xcode projects found; set the `project` attribute to one of: App.xcodeproj/project.pbxproj, Modules/Metrics/App/MetricsApp.xcodeproj/project.pbxproj, Modules/ContentModeration/ContentModerationDemo/ContentModerationDemo.xcodeproj/project.pbxproj, Modules/Mosaic/Apps/DesignSystem.xcodeproj/project.pbxproj, Modules/PurchaseKit/PurchaseKitPlayground/PurchaseKitPlayground/PurchaseKitPlayground.xcodeproj/project.pbxproj
--> once//modules/all.star:15294:9
|
15294 | fail(ctx["label"]["id"] + ": multiple Xcode projects found; set the `project` attribute to one of: " + ", ".join(candidates))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
while loading graph

Expected behavior

Would be nice if there was a CLI option for selecting the Xcode project or workspace without requiring a manifest, for example:

once query targets --project App.xcworkspace

or:

once native show xcode --path . --project App.xcworkspace

Motivation

Repositories commonly contain nested demo apps, development tools, package examples, and test projects.

Requiring once.toml solely to resolve this ambiguity adds friction to the “try Once against an existing Xcode project” workflow. The error already identifies the valid candidates, but there is currently no command-line repair.

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
M
mamouneyya Sep 3, 2026

Note that the agent’s clever workaround was to create a once.toml manifest at the root:

[workspace]
include = ["once.toml"]
[[target]]
name = "app"
kind = "xcode_workspace"
srcs = [
"App.xcworkspace/contents.xcworkspacedata",
"App.xcworkspace/xcshareddata/swiftpm/Package.resolved",
"App.xcodeproj/project.pbxproj",
"App.xcodeproj/xcshareddata/xcschemes/*.xcscheme",
"Modules/Mosaic/Apps/DesignSystem.xcodeproj/project.pbxproj",
"BuildSettings/**/*.xcconfig",
"Dependencies/Package.swift",
]
[target.attrs]
project = "App.xcworkspace"