Skip to content

Releases: ldomaradzki/xcsift

v1.0.13

13 Nov 17:18

Choose a tag to compare

What's Changed

Full Changelog: v1.0.12...v1.0.13

v1.0.12

08 Nov 06:46
b0004d3

Choose a tag to compare

What's Changed

  • Add automatic code coverage conversion and reporting by @alexey1312 in #13
  • Fix: Filter out JSON-like lines to prevent false error detection by @elaz-applift in #14

New Contributors

Full Changelog: v1.0.11...v1.0.12

v1.0.11

04 Nov 21:06

Choose a tag to compare

What's Changed

  • Remove unused SwiftLint dependency by @jonreid in #10
  • Add -w/--warnings flag to enable detailed warnings output by @webcoyote in #11
  • Add -q/--quiet flag to suppress output on success by @webcoyote in #12

New Contributors

Full Changelog: v1.0.10...v1.0.11

v1.0.10

24 Oct 04:56

Choose a tag to compare

Release Notes - v1.0.10

What's New

Swift Testing Framework Support

xcsift now correctly parses test output from Swift's new Testing framework. Previously, the passed_tests count would show 0 when using Swift Testing output format.

Fixed:

  • Passed test count now correctly reported for Swift Testing framework output
  • Added parser support for "Test run with N tests in N suites passed" summary format

Example:

Before v1.0.10:

{
  "status": "success",
  "summary": {
    "passed_tests": 0,  // ❌ Incorrect
    "failed_tests": 0
  }
}

After v1.0.10:

{
  "status": "success",
  "summary": {
    "passed_tests": 23,  // ✅ Correct
    "failed_tests": 0
  }
}

Installation

# Via Homebrew (will be updated shortly)
brew install ldomaradzki/tap/xcsift

# Manual installation
swift build -c release
cp .build/release/xcsift /usr/local/bin/

Compatibility

  • macOS 13.0+

  • Swift 5.10+

  • Works with both XCTest and Swift Testing frameworks

Full Changelog: v1.0.9...v1.0.10

v1.0.9

18 Oct 16:31

Choose a tag to compare

Release Notes - xcsift v1.0.9

🎉 New Features

Warning Detection and Reporting

xcsift now captures and reports warnings from both Swift compiler and linters like SwiftLint!

Key Features:

  • Token-efficient design: By default, only shows warning count in summary (reduces token usage for coding agents)
  • Optional detailed output: Use --print-warnings flag to see full warnings list with file paths, line numbers, and messages
  • Universal detection: Works with Swift compiler warnings, SwiftLint warnings, and other build tool warnings
  • Same format as errors: Warnings use the same structured JSON format as errors for consistency

Examples:

# Show warning count only (default)
swift build 2>&1 | xcsift
# Output: {"summary": {"warnings": 5, ...}}

# Show detailed warnings list
swift build 2>&1 | xcsift --print-warnings
# Output includes: {"warnings": [{"file": "...", "line": 42, "message": "..."}]}

SwiftLint Integration Support

Added SwiftLint as an optional SPM build plugin dependency to demonstrate linter integration:

  • Detects TODO comments when SwiftLint's todo rule is enabled
  • Captures all SwiftLint violations as warnings
  • Compatible with existing SwiftLint configurations via .swiftlint.yml

Note: SwiftLint is included as a build plugin but is optional. You can remove it if not needed, or configure it via .swiftlint.yml to customize which rules are enforced.

🔧 Technical Changes

OutputParser.swift

  • Added BuildWarning struct with file, line, and message fields
  • Updated BuildSummary to include warning count (always shown)
  • Updated BuildResult with warnings array (conditionally serialized based on printWarnings flag)
  • Implemented custom Codable encoding to handle conditional warnings output
  • Added parseWarning() method with regex patterns matching Swift compiler and linter output formats
  • Optimized line parsing with fast-path filtering for warning detection

main.swift

  • Added --print-warnings flag using ArgumentParser
  • Passed flag through to parser for conditional output control

Testing

  • Added 5 comprehensive unit tests for warning detection:
    • Single warning parsing
    • Multiple warnings parsing
    • Mixed errors and warnings
    • Flag behavior (warnings array omitted without flag, included with flag)
  • All tests pass (20 total: 18 existing + 5 new warning tests)
  • Manual testing verified with swift build, swift test, xcodebuild build, and xcodebuild test

Documentation

  • Updated CLAUDE.md with --print-warnings examples
  • Updated README.md with warning behavior documentation
  • Updated --help output with new flag description

📦 Installation

Homebrew

brew upgrade ldomaradzki/xcsift/xcsift

Manual

git clone https://github.com/ldomaradzki/xcsift.git
cd xcsift
swift build -c release
cp .build/release/xcsift /usr/local/bin/

📝 Full Changelog

  • Added: Warning detection from Swift compiler output
  • Added: Warning detection from SwiftLint and other linters
  • Added: --print-warnings flag for optional detailed warnings output
  • Added: Warning count in summary (always shown)
  • Added: SwiftLint build plugin integration (optional)
  • Added: .swiftlint.yml configuration with TODO detection
  • Added: 5 comprehensive unit tests for warning parsing
  • Improved: Token efficiency by showing only warning count by default
  • Updated: Documentation (CLAUDE.md, README.md) with warnings examples

Full Diff: v1.0.8...v1.0.9

v1.0.8

09 Oct 17:41

Choose a tag to compare

Release Notes - xcsift v1.0.8

🚀 Performance & Bug Fixes

Fixed: Stdin Hanging on Large Files

Previously, xcsift would hang indefinitely when processing large build output files (2+ MB) piped through stdin. This release completely fixes this issue with two key improvements:

Stdin Reading Fix:

  • Replaced custom polling-based stdin reading logic with proper FileHandle.readToEnd() API
  • Now correctly handles EOF signals when reading from pipes
  • Supports both modern macOS (10.15.4+) and older systems with appropriate fallbacks

Parser Performance Optimization:

  • Added fast-path string filtering before regex matching to avoid catastrophic backtracking
  • Optimized line splitting using split(separator:) instead of components(separatedBy:)
  • Filters out irrelevant lines (empty, too long, or without error/test keywords) before expensive regex operations
  • Parser now handles large files (8000+ lines, 2.6MB) in ~0.6 seconds instead of hanging indefinitely

Testing

  • Added comprehensive unit test with real-world 2.6MB build output fixture (8101 lines)
  • Test validates both correctness and performance (regression test for the hang fix)
  • All existing tests continue to pass

Technical Details

The hang was caused by two issues:

  1. Custom stdin reading used availableData with sleep delays, which didn't properly detect EOF on piped input
  2. Regex patterns with OneOrMore(.any, .reluctant) caused catastrophic backtracking on lines that didn't match

Both issues are now resolved, making xcsift production-ready for processing large Xcode build outputs.

Installation

Homebrew

brew upgrade ldomaradzki/xcsift/xcsift

Manual

git clone https://github.com/ldomaradzki/xcsift.git
cd xcsift
swift build -c release
cp .build/release/xcsift /usr/local/bin/

Full Changelog

  • Fixed: Stdin reading hangs on large files when piped through cat or similar commands
  • Fixed: Parser performance issues with large build outputs
  • Added: Real-world 2.6MB build output fixture for testing
  • Improved: Line parsing performance with fast-path filtering
  • Improved: Stdin reading using proper EOF-aware APIs

Full Diff: v1.0.7...v1.0.8

v1.0.7

08 Oct 20:44

Choose a tag to compare

Release v1.0.7

What's Changed

Bug Fixes

  • Fix duplicate error messages in JSON output: Swift compiler outputs each error twice (file location + visual caret line).
    xcsift now filters out the visual error lines to prevent duplicate entries in the JSON output, ensuring each error appears only once
    with proper file/line information.

Documentation

  • Update all documentation to use 2>&1: All usage examples now include 2>&1 redirection to properly capture stderr output
    where compiler errors are written. This ensures complete error reporting in the JSON output.
  • Updated README.md, CLAUDE.md, and command-line help text with proper stderr redirection examples

Improvements

  • Added unit test for Swift compiler visual error line filtering
  • Improved help text to explain the importance of stderr redirection

🙏 Contributors

Special thanks to:

  • @NachoSoto for contributing passed test count tracking in PR #5

Installation

Homebrew

brew upgrade ldomaradzki/xcsift/xcsift

Direct Download

Download the latest release from the releases page.

Usage

Always use 2>&1 to redirect stderr to stdout:

xcodebuild build 2>&1 | xcsift
xcodebuild test 2>&1 | xcsift
swift build 2>&1 | xcsift
swift test 2>&1 | xcsift

Full Changelog: v1.0.6...v1.0.7

v1.0.6

10 Jul 22:46

Choose a tag to compare

Full Changelog: v1.0.4...v1.0.6

v1.0.5

10 Jul 22:23

Choose a tag to compare

Full Changelog: v1.0.4...v1.0.5

v1.0.4

10 Jul 22:18

Choose a tag to compare

Full Changelog: v1.0.3...v1.0.4