Repository navigation
CI: fix mac_build_and_test for mlx-swift >= 0.31.5 (skip package plugin validation) + swift-format 603 conformance - #404
Merged
Conversation
mlx-swift 0.31.5 attached the CudaBuild build-tool plugin to the Cmlx
target. Xcode requires a one-time interactive trust approval per package
plugin; non-interactive xcodebuild has no way to grant it, so every
mac_build_and_test run since 0.31.5 was published fails during package
preparation with:
Validate plug-in "CudaBuild" in package "mlx-swift"
** TEST BUILD FAILED **
-skipPackagePluginValidation is the standard flag for building a
plugin-bearing SwiftPM graph on CI.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…orTests The lint job builds the latest swift-format release; 603.0.0 orders attributed imports after plain imports, so this file (formatted clean under the previous release) now fails pre-commit on every PR merge ref. This is the exact diff swift-format emits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 of 4 tasks
4 tasks done
davidkoski
approved these changes
Jul 9, 2026
davidkoski
left a comment
Member
There was a problem hiding this comment.
Thank you! Just waiting on CI.
This was referenced Jul 9, 2026
2 of 4 tasks
davidkoski
pushed a commit
that referenced
this pull request
Jul 15, 2026
* Document -skipPackagePluginValidation for local test runs mlx-swift 0.31.5 added the CudaBuild build-tool plugin, which xcodebuild refuses to run non-interactively without this flag; PR #404 added it to CI. CONTRIBUTING.md's documented test commands weren't updated, so contributors following them locally still hit the plugin trust error. Also add the docs-check CI step (scripts/verify-docs.sh), which builds DocC documentation for every library target with warnings-as-errors.
dkgv
pushed a commit
to dkgv/mlx-swift-lm
that referenced
this pull request
Jul 30, 2026
…in validation) + swift-format 603 conformance (ml-explore#404) * CI: pass -skipPackagePluginValidation to xcodebuild mlx-swift 0.31.5 attached the CudaBuild build-tool plugin to the Cmlx target. Xcode requires a one-time interactive trust approval per package plugin; non-interactive xcodebuild has no way to grant it, so every mac_build_and_test run since 0.31.5 was published fails during package preparation with: Validate plug-in "CudaBuild" in package "mlx-swift" ** TEST BUILD FAILED ** -skipPackagePluginValidation is the standard flag for building a plugin-bearing SwiftPM graph on CI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Fix swift-format 603.0.0 import ordering in MTPSpeculativeTokenIteratorTests The lint job builds the latest swift-format release; 603.0.0 orders attributed imports after plain imports, so this file (formatted clean under the previous release) now fails pre-commit on every PR merge ref. This is the exact diff swift-format emits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
dkgv
pushed a commit
to dkgv/mlx-swift-lm
that referenced
this pull request
Jul 30, 2026
…#430) * Document -skipPackagePluginValidation for local test runs mlx-swift 0.31.5 added the CudaBuild build-tool plugin, which xcodebuild refuses to run non-interactively without this flag; PR ml-explore#404 added it to CI. CONTRIBUTING.md's documented test commands weren't updated, so contributors following them locally still hit the plugin trust error. Also add the docs-check CI step (scripts/verify-docs.sh), which builds DocC documentation for every library target with warnings-as-errors.
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
…l-events CBv2 MTP: drop a finished step's Metal event from the arrays assistant history views (provider 0.10.13)
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.
Proposed changes
CI has been red for every PR since 2026-06-30. This PR fixes both causes; no library code is changed.
1.
mac_build_and_test: package plugin validation failureEvery run now fails during Prepare packages, before any project code compiles:
Diagnosis. mlx-swift 0.31.5 (via ml-explore/mlx-swift#413) attached the new
CudaBuildbuild-tool plugin to the Cmlx target. Xcode treats SwiftPM build-tool plugins as arbitrary build-time code and requires a one-time interactive trust approval per plugin ("Trust & Enable" in the GUI). Non-interactivexcodebuildcannot grant it, so validation fails. Because this repo pins.upToNextMinor(from: "0.31.4")with no committedPackage.resolved, CI resolves the newest 0.31.x fresh each run — 0.31.5 flowed in with no commit here to blame. The timeline is airtight: the last green run (28461282349) resolvedmlx-swift @ 0.31.4and finished at 17:08 UTC on 6/30; 0.31.5 was published at 17:33 UTC, 25 minutes later. Every subsequent run fails identically.Fix. Add
-skipPackagePluginValidationto thexcodebuild build-for-testinginvocation — perxcodebuild -help, "Skip validation of package plugins"; it is the standard way to build a plugin-bearing SwiftPM graph on CI (see Swift Forums on programmatic plugin trust for CI).Why this is safe here:
CudaBuildplugin is a no-op on macOS: itsisCudaEnabled()is#if os(Linux)-gated, so on the Mac runner it returns zero build commands. SwiftPM plugins also run sandboxed (write access only to their work directory).ml-explore/mlx-swiftitself — a first-party dependency — so the prompt adds no protection in this context.defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidation) on the runner works but is unversioned, invisible to contributors, and silently re-breaks on a runner rebuild. The workflow flag is auditable in the repo.2.
lint: swift-format 603.0.0 import orderingThe lint job builds the latest swift-format release on each run. 603.0.0 (current) orders attributed imports (
@_spi(Testing) @testable import …) after plain imports, soTests/MLXLMTests/MTPSpeculativeTokenIteratorTests.swift— clean under the previous release — now failspre-commit run --allon every PR's merge ref, which gatesmac_build_and_testbehind a failure unrelated to any PR. The second commit applies exactly the diff swift-format 603.0.0 emits (verified locally with swift-format 603.0.0 over the whole tree; this is the only file affected). A longer-term option is pinning the swift-format version in the workflow instead of always building the latest release — happy to do that here or in a follow-up if preferred.Since
pull_requestworkflows run from the PR merge ref, this PR's own CI run demonstrates both fixes.Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes🤖 Generated with Claude Code