Skip to content

fix(infra): Fix XcodeGen validation errors in Sundial demo project#69

Merged
leogdion merged 1 commit intov2.0.0from
SundialKit-Demo-Fix
Nov 24, 2025
Merged

fix(infra): Fix XcodeGen validation errors in Sundial demo project#69
leogdion merged 1 commit intov2.0.0from
SundialKit-Demo-Fix

Conversation

@leogdion
Copy link
Copy Markdown
Member

@leogdion leogdion commented Nov 24, 2025

Component

Infrastructure

Summary

Fixes XcodeGen validation errors in the Sundial demo project by removing redundant Info.plist source references from project.yml.

Problem

XcodeGen was failing with 4 validation errors:

4 Spec validations errors:
    - Target "SundialCombine-iOS" has a missing source directory "/Users/leo/Documents/Projects/SundialKit-Demo-Fix/Examples/Sundial/Resources/iOS/Info.plist"
    - Target "SundialCombine-watchOS" has a missing source directory "/Users/leo/Documents/Projects/SundialKit-Demo-Fix/Examples/Sundial/Resources/watchOS/Info-Combine.plist"
    - Target "SundialStream-iOS" has a missing source directory "/Users/leo/Documents/Projects/SundialKit-Demo-Fix/Examples/Sundial/Resources/iOS/Info.plist"
    - Target "SundialStream-watchOS" has a missing source directory "/Users/leo/Documents/Projects/SundialKit-Demo-Fix/Examples/Sundial/Resources/watchOS/Info-Stream.plist"

Root Cause

The project.yml was referencing Info.plist files in the sources sections with buildPhase: none. These references were redundant because XcodeGen automatically generates Info.plist files from the info.properties configurations defined for each target.

Changes

Removed Info.plist source references from all four targets:

  • ✅ SundialCombine-iOS: Removed Resources/iOS/Info.plist reference
  • ✅ SundialCombine-watchOS: Removed Resources/watchOS/Info-Combine.plist reference
  • ✅ SundialStream-iOS: Removed Resources/iOS/Info.plist reference
  • ✅ SundialStream-watchOS: Removed Resources/watchOS/Info-Stream.plist reference

The info.path and info.properties configurations remain intact, allowing XcodeGen to generate the plist files correctly.

Testing

  • XcodeGen runs without validation errors
  • All three Info.plist files are generated correctly:
    • Resources/iOS/Info.plist
    • Resources/watchOS/Info-Combine.plist
    • Resources/watchOS/Info-Stream.plist
  • Xcode project builds successfully

Result

The Sundial demo project now generates correctly with xcodegen, and all Info.plist files are properly created with the expected configurations.

🤖 Generated with Claude Code


Perform an AI-assisted review on CodePeer.com

XcodeGen was failing with validation errors because it expected Info.plist files to exist as source files. These references were redundant since XcodeGen automatically generates Info.plist files from the info.properties configurations.

Changes:
- Removed Info.plist source reference from SundialCombine-iOS target
- Removed Info-Combine.plist source reference from SundialCombine-watchOS target
- Removed Info.plist source reference from SundialStream-iOS target
- Removed Info-Stream.plist source reference from SundialStream-watchOS target

The info.path and info.properties configurations remain intact, allowing XcodeGen to generate the plist files correctly.

Fixes XcodeGen validation errors:
- Target "SundialCombine-iOS" has a missing source directory
- Target "SundialCombine-watchOS" has a missing source directory
- Target "SundialStream-iOS" has a missing source directory
- Target "SundialStream-watchOS" has a missing source directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@leogdion leogdion added the component:infrastructure Build, CI/CD, tooling, git-subrepo label Nov 24, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 24, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch SundialKit-Demo-Fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.20%. Comparing base (7d9d855) to head (04e792e).
⚠️ Report is 1 commits behind head on v2.0.0.

Additional details and impacted files
@@            Coverage Diff             @@
##           v2.0.0      #69      +/-   ##
==========================================
- Coverage   65.39%   65.20%   -0.20%     
==========================================
  Files          31       31              
  Lines         526      526              
==========================================
- Hits          344      343       -1     
- Misses        182      183       +1     
Flag Coverage Δ
spm 66.60% <ø> (-0.20%) ⬇️
swift-6.1-jammy 65.59% <ø> (ø)
swift-6.1-jammy-nightly 65.59% <ø> (-0.23%) ⬇️
swift-6.1-noble 65.59% <ø> (ø)
swift-6.1-noble-nightly 65.59% <ø> (ø)
swift-6.2-jammy 65.59% <ø> (ø)
swift-6.2-jammy-nightly 65.59% <ø> (ø)
swift-6.2-noble 65.59% <ø> (ø)
swift-6.2-noble-nightly 65.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude
Copy link
Copy Markdown

claude bot commented Nov 24, 2025

Code Review - PR #69: Fix XcodeGen validation errors

Summary

This PR correctly resolves XcodeGen validation errors by removing redundant Info.plist source references from project.yml. The fix is clean, well-documented, and follows best practices for XcodeGen project configuration.


✅ Strengths

1. Root Cause Analysis

  • Excellent problem diagnosis: Identified that Info.plist files were being referenced twice (in sources with buildPhase: none AND in info.path)
  • Clear documentation of validation errors with actual output
  • Proper understanding that XcodeGen auto-generates Info.plist files from info.properties

2. Minimal, Surgical Changes

  • Only removed the redundant source references (8 lines total)
  • Preserved all info.path and info.properties configurations intact
  • No unnecessary refactoring or scope creep
  • Follows the principle: "Make the minimal change that fixes the problem"

3. Complete Coverage

  • Fixed all 4 affected targets:
    • SundialCombine-iOS
    • SundialCombine-watchOS
    • SundialStream-iOS
    • SundialStream-watchOS
  • Consistent approach across all targets

4. Documentation Quality

  • Comprehensive PR description with problem/solution/testing sections
  • Clear checklist of what was tested
  • Good use of component labeling (component:infrastructure)

📋 Testing Verification

Based on the PR description, the following was tested:

  • ✅ XcodeGen runs without validation errors
  • ✅ Info.plist files generate correctly
  • ✅ Xcode project builds successfully

Recommendation: Consider adding these additional verification steps:

  1. Verify the Fastlane build process still works (line 109 in Fastfile calls xcodegen generate)
  2. Confirm CI/CD pipeline passes (sundial-demo.yml workflow)
  3. Test that both demo apps still archive correctly with proper Info.plist values

🔍 Analysis of XcodeGen Configuration

The fix aligns perfectly with XcodeGen's intended behavior:

Before (Incorrect):

sources:
  - path: Resources/iOS/Info.plist
    buildPhase: none  # ❌ Redundant reference
info:
  path: Resources/iOS/Info.plist  # ✅ Correct way to specify Info.plist
  properties: {...}

After (Correct):

sources:
  # Info.plist reference removed
info:
  path: Resources/iOS/Info.plist  # ✅ XcodeGen generates this file
  properties: {...}

When info.path and info.properties are specified, XcodeGen:

  1. Generates an Info.plist file at the specified path
  2. Populates it with the properties defined in the YAML
  3. Automatically configures the target to use this plist

Adding the same path to sources with buildPhase: none creates a conflict because XcodeGen expects to generate the file, not reference an existing one.


🎯 Impact Assessment

Positive Impacts:

  • ✅ Resolves XcodeGen validation errors blocking project generation
  • ✅ Aligns with XcodeGen best practices
  • ✅ No runtime behavior changes (Info.plist content unchanged)
  • ✅ Simplifies project configuration

Risk Assessment:

  • 🟢 Very Low Risk: This is purely a project configuration fix
  • Info.plist generation behavior remains identical
  • All info.properties values preserved
  • CI/CD workflow unchanged (still calls xcodegen generate at line 109 of Fastfile)

🔧 Build System Integration

The fix correctly integrates with the existing build pipeline:

  1. Fastlane Integration (Fastfile:109):

    sh("cd .. && xcodegen generate")
    • Will now succeed without validation errors
  2. CI/CD Workflow (sundial-demo.yml):

    • archive-demo job depends on successful build
    • XcodeGen must succeed before code signing
    • This fix unblocks the entire deployment pipeline
  3. Info.plist Generation:

    • iOS targets use Resources/iOS/Info.plist
    • watchOS Combine uses Resources/watchOS/Info-Combine.plist
    • watchOS Stream uses Resources/watchOS/Info-Stream.plist
    • All properly configured with info.path + info.properties

📚 Additional Observations

Code Quality

  • ✅ YAML formatting consistent
  • ✅ Comments preserved (# MARK: sections)
  • ✅ No syntax errors
  • ✅ Follows repository conventions

Swift 6.1 Compliance

  • Configuration includes:
    • SWIFT_VERSION: "6.1"
    • ENABLE_EXPERIMENTAL_FEATURE: StrictConcurrency
    • ENABLE_UPCOMING_FEATURE: ExistentialAny
  • All preserved correctly

Platform Targets

  • iOS deployment: 16.0 (Combine), 17.0 (Stream) ✅
  • watchOS deployment: 9.0 (Combine), 10.0 (Stream) ✅
  • Aligns with SundialKit v2.0.0 requirements

🚀 Recommendations

Before Merge:

  1. Verify CI passes: Ensure sundial-demo.yml workflow completes successfully
  2. Test Fastlane lanes: Run bundle exec fastlane build_only_all locally to confirm archiving works
  3. Validate Info.plist contents: After generation, verify all plist files contain expected keys (CFBundleVersion, UIApplicationSceneManifest, etc.)

Optional Improvements (Future PRs):

  1. Consider adding a CI validation step that runs xcodegen generate --spec project.yml --use-cache to catch config errors early
  2. Document the Info.plist generation approach in a comment within project.yml
  3. Add XcodeGen version to mise.toml for consistency across environments

✅ Final Verdict

Approved

This is a well-researched, minimal fix that correctly addresses the XcodeGen validation errors. The changes are:

  • Technically sound
  • Low risk
  • Well documented
  • Complete

The PR follows SundialKit's development practices and properly uses component labeling for infrastructure changes.

Confidence Level: High - This fix aligns perfectly with XcodeGen's documented behavior and resolves the exact error messages reported.


Review completed using Claude Code with SundialKit CLAUDE.md context

@leogdion leogdion merged commit 0257a8c into v2.0.0 Nov 24, 2025
34 of 35 checks passed
@leogdion leogdion deleted the SundialKit-Demo-Fix branch November 24, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:infrastructure Build, CI/CD, tooling, git-subrepo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant