Skip to content

new(tuist.io/tuist): declarative Xcode project generator#13129

Open
tannevaled wants to merge 5 commits into
pkgxdev:mainfrom
tannevaled:new/tuist
Open

new(tuist.io/tuist): declarative Xcode project generator#13129
tannevaled wants to merge 5 commits into
pkgxdev:mainfrom
tannevaled:new/tuist

Conversation

@tannevaled
Copy link
Copy Markdown
Contributor

Summary

Tuist is a declarative Xcode project generator — the analog of cmake for native iOS/macOS development, and the top alternative to XcodeGen (already in pantry). The Tuist organisation's other tools, like xcbeautify, are already shipped under projects/tuist.io/; this PR adds the missing core CLI.

  • Pure-Swift, built from source via SPM against pantry's swift.org compiler.
  • Pinned to >=6.1 swift-tools-version (per upstream's Package.swift).
  • Upstream pins all SPM dependencies to its own Swift Package Registry (registry.tuist.dev, anonymous read). The build resolves via swift build --replace-scm-with-registry so the registry-keyed Package.resolved is honoured.
  • Upstream's release workflow sed-patches Constants.swift to bake the version (the tarball string is stale by one release); the recipe replicates that sed.
  • Tuist's ResourceLocator / TemplatesDirectoryLocator explicitly support a Homebrew-shape layout: bin/tuist + lib/libProjectDescription.dylib (+ lib/Modules/ProjectDescription.swiftmodule for the -I include search path) + share/Templates. The recipe installs into that shape.
  • Darwin only for now (pantry's swift.org is darwin-only — see its commented-out Linux platforms; revisit when an Ubuntu 22.04 toolchain lands).

Test plan

  • pantry CI builds darwin/x86-64 and darwin/aarch64.
  • tuist version prints 4.195.11.

🤖 Generated with Claude Code

tannevaled and others added 5 commits May 31, 2026 17:17
Tuist is a pure-Swift CLI that turns declarative project manifests
(Project.swift, Tuist.swift) into Xcode projects/workspaces. The
analog of cmake for native iOS/macOS development; top alternative
to XcodeGen (also in pantry).

Built from source via SPM against pantry's swift.org compiler.
Tuist's dependencies are pinned to its own Swift Package Registry
(registry.tuist.dev, anonymous read), so SPM resolves with
--replace-scm-with-registry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The previous recipe used YAML plain-scalar line-folding for the
swift-build invocation:

    - swift build
        --product tuist
        ...

brewkit's getScript.ts rejected this with `every node in a script
YAML array must contain a 'run' key` (job 78735768858, fail in 42s).
Wrapping the multi-line command in `run: |` (literal block scalar
with explicit line continuations) is the established pattern in
other pantry recipes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The sed command's pattern contains the literal `String! = ` Swift
type annotation, which has `: ` (colon-space) — YAML's plain-scalar
parser interprets this as starting a mapping key/value pair. The
resulting script item is parsed as a mapping (with garbled keys)
rather than a string, and brewkit's getScript.ts:44 rejects it with
`every node in a script YAML array must contain a 'run' key`.

Wrapping the sed in `run: |` makes the whole content a literal
block scalar where YAML does not interpret `: ` as a structural
character. Same class of bug as the pyqt5 fix earlier today.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The previous iteration (commit 4c2dd83 / cedc672) used:

  swift build --product tuist --product ProjectDescription ...

SwiftPM's `--product` flag accepts only ONE value; repeating it
silently keeps the last. Only ProjectDescription was built, and
the next install step failed with:

  install: cannot stat '.swift-build/release/tuist': No such file
  or directory

(job 78737503534, fail at 4m13s after the YAML-parse fix worked.)

Split into two sequential invocations. The second reuses cached
artifacts from the first, so the wall-time overhead is small.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant