Skip to content

Drive local builds through tuist xcodebuild - #98

Merged
devxoul merged 1 commit into
mainfrom
chore/tuist-xcodebuild
Sep 21, 2026
Merged

devxoul merged 1 commit into
mainfrom
chore/tuist-xcodebuild

Conversation

@devxoul

@devxoul devxoul commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Problem

tuist build Allkdic (used by make build/make run) now prints a deprecation warning under Tuist 4.200.5 — tuist xcodebuild is the supported replacement.

Fixing that surfaced two more issues:

  • tuist xcodebuild is a thin xcodebuild wrapper and does not generate the project first, unlike tuist build. make test never generated the project either, so it failed outright on a fresh clone.
  • make run located the built app by globbing ~/Library/Developer/Xcode/DerivedData/Allkdic-*/..., which silently picks an arbitrary match when more than one hashed directory exists.
  • make test piped xcodebuild test | xcpretty without set -o pipefail, so the target's exit code was xcpretty's, not xcodebuild's — a failing test suite could not fail make test.

Solution

  • Replace tuist build Allkdic with tuist xcodebuild build in build/run, and xcodebuild test | xcpretty with tuist xcodebuild test (Tuist already formats the output).
  • Add generate as a prerequisite of build and test, restoring the implicit generate that tuist build used to provide and adding it to test for the first time.
  • Introduce XCODEBUILD_FLAGS and pin DERIVED_DATA to .build/DerivedData (already gitignored), so run reads the app from a known path instead of globbing Xcode's DerivedData.
  • Add the missing lint-ci to .PHONY.
  • Update the AGENTS.md build-system table and note that tuist build is deprecated and must not come back.

CI (ci.yml, release.yml) is untouched — it calls xcodebuild directly with signing disabled and doesn't go through the Makefile.

Testing

make build and make test hit the same code-signing gate locally that tuist build already hit before this change (no "Mac Development" cert on this machine) — this is pre-existing behavior, not a regression. With signing disabled via a command-line XCODEBUILD_FLAGS override:

  • make build succeeds and the binary lands exactly at the pinned DERIVED_DATA path.
  • make test runs the suite green — 45 tests, 0 failures.

Summary by cubic

Replaces the deprecated tuist build with tuist xcodebuild for local make build, make run, and make test, and makes those targets more reliable.

  • build and test now depend on generate because tuist xcodebuild does not generate the project first (test never did).
  • Pins build products to .build/DerivedData so run reads from a known path instead of globbing Xcode's hashed DerivedData, which can silently match the wrong directory.
  • test drops the | xcpretty pipe (which swallowed xcodebuild's exit code), so a failing suite now fails make test.
  • Adds the missing lint-ci to .PHONY and updates the AGENTS.md build-system table.

Written for commit f2c6f56. Summary will update on new commits.

Review in cubic

`tuist build` is deprecated in favor of the `tuist xcodebuild` wrapper, so
`make build`/`make run` printed a deprecation warning on every invocation.

`tuist xcodebuild` is a thin wrapper around xcodebuild and does not generate
the project, so `build` and `test` now depend on `generate` — which `tuist
build` used to do implicitly, and which `test` never did at all.

Derived data is pinned to `.build/DerivedData` (already gitignored) so `run`
can point at the built app directly instead of globbing Xcode's hashed
DerivedData directory, which silently picks an arbitrary match when more
than one exists.

`test` moves to `tuist xcodebuild test` for the same reason, and drops the
`| xcpretty` pipe: tuist already formats the output, and the pipe swallowed
xcodebuild's exit code so failing tests could not fail the target.

CI is untouched; it calls xcodebuild directly with signing disabled.

@typeey typeey Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The targets preserve the existing workspace, scheme, and configuration contract, while the pinned DerivedData path correctly matches the app product location. The documentation accurately records the rationale, and no correctness or regression issues are evident.

@devxoul
devxoul merged commit 5cc9177 into main Sep 21, 2026
1 of 2 checks passed
@devxoul
devxoul deleted the chore/tuist-xcodebuild branch September 21, 2026 01:57
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