new(tuist.io/tuist): declarative Xcode project generator#13129
Open
tannevaled wants to merge 5 commits into
Open
new(tuist.io/tuist): declarative Xcode project generator#13129tannevaled wants to merge 5 commits into
tannevaled wants to merge 5 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 underprojects/tuist.io/; this PR adds the missing core CLI.swift.orgcompiler.>=6.1swift-tools-version (per upstream'sPackage.swift).registry.tuist.dev, anonymous read). The build resolves viaswift build --replace-scm-with-registryso the registry-keyedPackage.resolvedis honoured.Constants.swiftto bake the version (the tarball string is stale by one release); the recipe replicates that sed.ResourceLocator/TemplatesDirectoryLocatorexplicitly support a Homebrew-shape layout:bin/tuist+lib/libProjectDescription.dylib(+lib/Modules/ProjectDescription.swiftmodulefor the-Iinclude search path) +share/Templates. The recipe installs into that shape.swift.orgis darwin-only — see its commented-out Linux platforms; revisit when an Ubuntu 22.04 toolchain lands).Test plan
tuist versionprints4.195.11.🤖 Generated with Claude Code