|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Project Architecture |
| 6 | + |
| 7 | +XcodeGraph is a Swift Package containing data structures and utilities for modeling Xcode project graphs. It consists of three main modules: |
| 8 | + |
| 9 | +- **XcodeGraph**: Core data structures (Graph, Target, Project, Workspace, etc.) for modeling Xcode projects |
| 10 | +- **XcodeMetadata**: Metadata extraction from precompiled binaries (frameworks, libraries, XCFrameworks) |
| 11 | +- **XcodeGraphMapper**: Maps actual `.xcworkspace`/`.xcodeproj` files to XcodeGraph structures using XcodeProj |
| 12 | + |
| 13 | +### Key Components |
| 14 | + |
| 15 | +- `Sources/XcodeGraph/Models/`: Core data structures like Project, Target, Scheme, BuildConfiguration |
| 16 | +- `Sources/XcodeGraph/Graph/`: Graph representation with dependencies and relationships |
| 17 | +- `Sources/XcodeGraphMapper/Mappers/`: Conversion logic from XcodeProj to XcodeGraph models |
| 18 | +- `Sources/XcodeMetadata/Providers/`: Binary metadata extraction for frameworks and libraries |
| 19 | + |
| 20 | +## Development Commands |
| 21 | + |
| 22 | +### Building |
| 23 | +```bash |
| 24 | +swift build # Debug build |
| 25 | +swift build --configuration release # Release build |
| 26 | +``` |
| 27 | + |
| 28 | +### Testing |
| 29 | +```bash |
| 30 | +swift test # Run all tests |
| 31 | +swift test --skip XcodeGraphMapperTests --skip XcodeMetadataTests # Linux (no Xcode utilities) |
| 32 | +``` |
| 33 | + |
| 34 | +### Linting |
| 35 | +```bash |
| 36 | +mise run lint # Run SwiftLint and SwiftFormat |
| 37 | +mise run lint-fix # Auto-fix linting issues |
| 38 | +``` |
| 39 | + |
| 40 | +### Documentation |
| 41 | +```bash |
| 42 | +mise run docs:build # Build documentation |
| 43 | +``` |
| 44 | + |
| 45 | +## Platform Support |
| 46 | + |
| 47 | +- Requires macOS 13+ for full functionality |
| 48 | +- Linux support available with limited testing (XcodeGraphMapperTests and XcodeMetadataTests require Xcode utilities) |
| 49 | +- Swift 6.0.3+ with StrictConcurrency enabled |
| 50 | + |
| 51 | +## Testing Strategy |
| 52 | + |
| 53 | +- Unit tests for each module in corresponding `Tests/` directories |
| 54 | +- Test data and mocks in `Tests/*/TestData/` and `Tests/*/Mocks/` |
| 55 | +- XCFramework fixtures in `Tests/Fixtures/` for metadata testing |
0 commit comments