rtk-ai/rtk

feat: comprehensive Swift ecosystem support (test, package, run, lint)

Open

#848 创建于 2026年3月26日

在 GitHub 查看
 (1 评论) (4 反应) (0 负责人)Rust (2,914 fork)batch import
area:clieffort-largeeffort-mediumenhancementhelp wantedplatform:macospriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

Context

RTK has minimal Swift support — only swift build has a TOML filter (swift-build.toml), and swift test was just added to the rewrite rules (#767) but has no output filter.

Swift developers use many more commands daily that would benefit from RTK filtering.

Scope

Command Output type Filter approach Expected savings
swift test Test results (pass/fail, timing, assertions) TOML or Rust — strip passing tests, show failures only 80-90%
swift test --parallel Parallel test output Same as above 80-90%
swift test --filter Filtered test subset Same as above 70-80%
swift package resolve Dependency resolution (Fetching/Resolving lines) TOML — strip Fetching/Resolving noise 80-90%
swift package update Package update output TOML — strip noise, show summary 80-90%
swift run Build + run output TOML — strip Compiling/Linking, show app output 70-80%
swiftlint Linter violations TOML or Rust — group by rule/severity 70-85%
swiftformat Formatter output TOML — files changed summary 70-80%
xcodebuild test Xcode test output (very verbose) Rust — complex output, failures only 90-95%
xcodebuild build Xcode build output Already has xcodebuild.toml — verify coverage 80-90%

Current state

What Status
swift build filter TOML swift-build.toml
swift test rewrite PR #767 (approved)
swift test filter Missing
swift package Missing
swift run Missing
swiftlint Missing
swiftformat Missing
xcodebuild build filter TOML xcodebuild.toml
xcodebuild test filter Missing

Implementation

Most commands can be TOML filters (simple pattern stripping). swift test and xcodebuild test may need Rust modules for structured test output parsing (failures only, timing).

Rewrite rules to add

swift package resolve → rtk swift package resolve
swift package update → rtk swift package update
swift run → rtk swift run
swiftlint → rtk swiftlint
swiftformat → rtk swiftformat

References

  • Existing filter: src/filters/swift-build.toml
  • Existing filter: src/filters/xcodebuild.toml
  • PR #767: swift test rewrite rule
  • Issue #765: original swift test request

贡献者指南