Skip to content

Commit bb3ff23

Browse files
authored
Add CLAUDE.md (#177)
1 parent cc5a58c commit bb3ff23

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

CLAUDE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# OpenAttributeGraph Project Guide
2+
3+
## Project Overview
4+
OpenAttributeGraph is a Swift package that provides attribute graph functionality, serving as a foundation for OpenSwiftUI project. It interfaces with DarwinPrivateFrameworks for compatibility testing.
5+
6+
## Development Workflow
7+
8+
### 1. Make Changes and Commit
9+
- Implement your feature or fix
10+
- Test locally
11+
- Commit changes with descriptive messages
12+
13+
### 2. (Optional) Compatibility Testing
14+
If changes affect the interface with DarwinPrivateFrameworks:
15+
```bash
16+
# Generate AG template
17+
Scripts/gen_ag_template.sh
18+
`
19+
# Update code in ../DarwinPrivateFramework from .ag_template
20+
21+
# Set useLocalDeps to true in Package.swift
22+
xed -l -c 's/let useLocalDeps = envEnable("OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS")/let useLocalDeps = true/' Package.swift
23+
24+
# Build and test with both compatibility modes:
25+
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST=0 swift build
26+
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST=1 swift build
27+
```
28+
29+
### 3. Create DarwinPrivateFramework PR
30+
After testing, discard local changes from step 2:
31+
```bash
32+
# Discard any local testing changes
33+
git checkout -- Package.swift
34+
35+
# Create PR for DarwinPrivateFramework
36+
Scripts/bump_ag_pr.sh <branch-name>
37+
```
38+
39+
### 4. Update Dependencies
40+
After the DarwinPrivateFramework PR is merged:
41+
```bash
42+
# Update package dependencies
43+
swift package update DarwinPrivateFramework
44+
45+
# Commit the updated Package.resolved
46+
git add Package.resolved
47+
git commit -m "Update DarwinPrivateFrameworks dependency"
48+
```
49+
50+
### 5. Create Project PR
51+
```bash
52+
# Create PR for the current branch
53+
gh pr create --base main --head <current-branch>
54+
```
55+
56+
## Key Scripts
57+
- `Scripts/gen_ag_template.sh` - Generates AG template for compatibility testing
58+
- `Scripts/bump_ag_pr.sh` - Creates PR for DarwinPrivateFramework updates
59+
60+
## Environment Variables
61+
- `OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST=0` - Test without compatibility mode
62+
- `OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST=1` - Test with compatibility mode
63+
64+
## Important Notes
65+
- Always test compatibility when changing interfaces
66+
- Ensure DarwinPrivateFramework PR is merged before creating main project PR
67+
- Keep Package.resolved updated after dependency changes

0 commit comments

Comments
 (0)