diff --git a/AGENT.md b/AGENT.md new file mode 100644 index 00000000..16f9380d --- /dev/null +++ b/AGENT.md @@ -0,0 +1,55 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Architecture + +XcodeGraph is a Swift Package containing data structures and utilities for modeling Xcode project graphs. It consists of three main modules: + +- **XcodeGraph**: Core data structures (Graph, Target, Project, Workspace, etc.) for modeling Xcode projects +- **XcodeMetadata**: Metadata extraction from precompiled binaries (frameworks, libraries, XCFrameworks) +- **XcodeGraphMapper**: Maps actual `.xcworkspace`/`.xcodeproj` files to XcodeGraph structures using XcodeProj + +### Key Components + +- `Sources/XcodeGraph/Models/`: Core data structures like Project, Target, Scheme, BuildConfiguration +- `Sources/XcodeGraph/Graph/`: Graph representation with dependencies and relationships +- `Sources/XcodeGraphMapper/Mappers/`: Conversion logic from XcodeProj to XcodeGraph models +- `Sources/XcodeMetadata/Providers/`: Binary metadata extraction for frameworks and libraries + +## Development Commands + +### Building +```bash +swift build # Debug build +swift build --configuration release # Release build +``` + +### Testing +```bash +swift test # Run all tests +swift test --skip XcodeGraphMapperTests --skip XcodeMetadataTests # Linux (no Xcode utilities) +``` + +### Linting +```bash +mise run lint # Run SwiftLint and SwiftFormat +mise run lint-fix # Auto-fix linting issues +``` + +### Documentation +```bash +mise run docs:build # Build documentation +``` + +## Platform Support + +- Requires macOS 13+ for full functionality +- Linux support available with limited testing (XcodeGraphMapperTests and XcodeMetadataTests require Xcode utilities) +- Swift 6.0.3+ with StrictConcurrency enabled + +## Testing Strategy + +- Unit tests for each module in corresponding `Tests/` directories +- Test data and mocks in `Tests/*/TestData/` and `Tests/*/Mocks/` +- XCFramework fixtures in `Tests/Fixtures/` for metadata testing \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 16f9380d..00000000 --- a/CLAUDE.md +++ /dev/null @@ -1,55 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Project Architecture - -XcodeGraph is a Swift Package containing data structures and utilities for modeling Xcode project graphs. It consists of three main modules: - -- **XcodeGraph**: Core data structures (Graph, Target, Project, Workspace, etc.) for modeling Xcode projects -- **XcodeMetadata**: Metadata extraction from precompiled binaries (frameworks, libraries, XCFrameworks) -- **XcodeGraphMapper**: Maps actual `.xcworkspace`/`.xcodeproj` files to XcodeGraph structures using XcodeProj - -### Key Components - -- `Sources/XcodeGraph/Models/`: Core data structures like Project, Target, Scheme, BuildConfiguration -- `Sources/XcodeGraph/Graph/`: Graph representation with dependencies and relationships -- `Sources/XcodeGraphMapper/Mappers/`: Conversion logic from XcodeProj to XcodeGraph models -- `Sources/XcodeMetadata/Providers/`: Binary metadata extraction for frameworks and libraries - -## Development Commands - -### Building -```bash -swift build # Debug build -swift build --configuration release # Release build -``` - -### Testing -```bash -swift test # Run all tests -swift test --skip XcodeGraphMapperTests --skip XcodeMetadataTests # Linux (no Xcode utilities) -``` - -### Linting -```bash -mise run lint # Run SwiftLint and SwiftFormat -mise run lint-fix # Auto-fix linting issues -``` - -### Documentation -```bash -mise run docs:build # Build documentation -``` - -## Platform Support - -- Requires macOS 13+ for full functionality -- Linux support available with limited testing (XcodeGraphMapperTests and XcodeMetadataTests require Xcode utilities) -- Swift 6.0.3+ with StrictConcurrency enabled - -## Testing Strategy - -- Unit tests for each module in corresponding `Tests/` directories -- Test data and mocks in `Tests/*/TestData/` and `Tests/*/Mocks/` -- XCFramework fixtures in `Tests/Fixtures/` for metadata testing \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 00000000..ac534a31 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENT.md \ No newline at end of file diff --git a/Package.resolved b/Package.resolved index 53f46a7b..32bb460b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "63410ed7266ea52796cbd3155e88de62eb6f52f3ffba07a8b338d10bd332ff65", + "originHash" : "8f7ec11605d33c49dbca76c7a21b5bd815e6cf5bb841293a364d2ecc96d68509", "pins" : [ { "identity" : "aexml", @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/FileSystem.git", "state" : { - "revision" : "7aed628044e2e0595aec876cadb694aacab13a16", - "version" : "0.10.8" + "revision" : "1fa815a9fae52c8df462f80a7d19f2d72afb2a0c", + "version" : "0.10.15" } }, { @@ -105,8 +105,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/swiftlang/swift-docc-plugin", "state" : { - "revision" : "d1691545d53581400b1de9b0472d45eb25c19fed", - "version" : "1.4.4" + "revision" : "3e4f133a77e644a5812911a0513aeb7288b07d06", + "version" : "1.4.5" } }, { @@ -141,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio", "state" : { - "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", - "version" : "2.83.0" + "revision" : "ad6b5f17270a7008f60d35ec5378e6144a575162", + "version" : "2.84.0" } }, { @@ -168,8 +168,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj", "state" : { - "revision" : "4488984883071307a9136251e7ccf06a41b6258d", - "version" : "9.4.2" + "revision" : "9799bb429fda8e360f4c535af1716bebc89fb235", + "version" : "9.4.3" } }, { diff --git a/Sources/XcodeGraph/PackageInfo.swift b/Sources/XcodeGraph/PackageInfo.swift index 237cf6c9..349ce484 100644 --- a/Sources/XcodeGraph/PackageInfo.swift +++ b/Sources/XcodeGraph/PackageInfo.swift @@ -448,6 +448,7 @@ extension PackageInfo.Target { case unsafeFlags case enableUpcomingFeature case enableExperimentalFeature + case interoperabilityMode } /// An individual build setting. @@ -497,6 +498,7 @@ extension PackageInfo.Target { case unsafeFlags([String]) case enableUpcomingFeature(String) case enableExperimentalFeature(String) + case interoperabilityMode(String) } public init(from decoder: Decoder) throws { @@ -506,6 +508,9 @@ extension PackageInfo.Target { condition = try container.decodeIfPresent(PackageInfo.PackageConditionDescription.self, forKey: .condition) if let kind = try? container.decode(Kind.self, forKey: .kind) { switch kind { + case let .interoperabilityMode(mode): + name = .interoperabilityMode + value = [mode] case let .headerSearchPath(value): name = .headerSearchPath self.value = [value] @@ -543,6 +548,8 @@ extension PackageInfo.Target { try container.encode(tool, forKey: .tool) try container.encodeIfPresent(condition, forKey: .condition) switch name { + case .interoperabilityMode: + try container.encode(Kind.interoperabilityMode(value.first!), forKey: .kind) case .headerSearchPath: try container.encode(Kind.headerSearchPath(value.first!), forKey: .kind) case .define: