Skip to content

Commit edb43cc

Browse files
authored
Copilot: Fix GYB generation instructions.
1 parent 55ad16f commit edb43cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/copilot-instructions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Execute these commands in order for a fresh repository setup:
3434
2. **Generate Swift Source Code** (REQUIRED):
3535
```bash
3636
# Generate the main Device.generated.swift file from template
37-
python3 Utils/gyb.py Source/Device.swift.gyb > Source/Device.generated.swift
37+
./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb
3838
```
3939
- Takes < 1 minute
4040
- Must be run after any changes to `Source/Device.swift.gyb`
@@ -86,7 +86,7 @@ Since this is a device detection library, validation focuses on:
8686
1. **Code Generation Validation** (Always required):
8787
```bash
8888
# Verify code generation works and produces valid Swift
89-
python3 Utils/gyb.py Source/Device.swift.gyb > Source/Device.generated.swift
89+
./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb
9090
wc -l Source/Device.generated.swift # Should show ~2700-4000 lines
9191
```
9292
- Must produce Swift code without syntax errors
@@ -136,7 +136,7 @@ Since this is a device detection library, validation focuses on:
136136

137137
### Adding New Device Support
138138
1. Edit `Source/Device.swift.gyb` to add new device entries
139-
2. Regenerate: `python3 Utils/gyb.py Source/Device.swift.gyb > Source/Device.generated.swift`
139+
2. Regenerate: `./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb`
140140
3. Build and test: `swift build && swift test`
141141
4. Lint: `swiftlint`
142142
5. Test on relevant simulators
@@ -158,7 +158,7 @@ Since this is a device detection library, validation focuses on:
158158

159159
**"SwiftLint not found"**: Install via `brew install swiftlint` (macOS only)
160160

161-
**"Code generation produces different output"**: Ensure you're using Python 3 and the exact command: `python3 Utils/gyb.py Source/Device.swift.gyb > Source/Device.generated.swift`
161+
**"Code generation produces different output"**: Ensure you're using Python 3 and the exact command: `./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb`
162162

163163
**"Permission denied installing gems"**: Use `sudo gem install bundler` or install gems in user directory
164164

@@ -207,7 +207,7 @@ DeviceKit.podspec # CocoaPods specification
207207
## Command Validation Status
208208

209209
### ✅ Verified on Linux (Limited):
210-
- `python3 Utils/gyb.py Source/Device.swift.gyb > Source/Device.generated.swift` - Works, produces valid Swift code
210+
- `./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb` - Works, produces valid Swift code
211211
- Repository structure exploration and documentation review
212212
- Package.swift and project file validation
213213

0 commit comments

Comments
 (0)