Skip to content

Commit c9b747b

Browse files
JoeMattclaude
andcommitted
docs: point SystemIdentifier docs at the PVSystems repo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3007db3 commit c9b747b

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎CLAUDE.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ The app is split into ~26 `PV*` Swift Package frameworks. Key modules:
7777
- **PVPatching** — ROM/disc patches (IPS, IPS32, BPS, UPS, PPF, xdelta3): import, matching, cache, Patch Applier, patch creation, online catalog
7878
- **PVPatchEngine** — the streaming patch engine PVPatching applies through (bounded memory, 64-bit offsets, vendored Apache-2.0 xdelta3). Its own repo, github.com/Provenance-Emu/PVPatchEngine, which iCube and iFly also depend on by URL: change it there, tag a release, bump the version in `PVPatching/Package.swift`. Only `PVPatching/Sources/PVPatching/Engine/EngineBridge.swift` may import it (its `PatchFormat`/`PatchError`/`PatchProgress` clash with PVPatching's)
7979
- **PVPrimitives** — Base data types shared across modules
80+
- **PVSystems** (separate repo, github.com/Provenance-Emu/PVSystems) — `SystemIdentifier` and per-system metadata (TheGamesDB/libretrodb/OpenVGDB IDs, RetroAchievements console IDs, per-game BIOS manifest). Shared with iCube and iFly: change it there, tag a release, then bump the pin in `Provenance.xcworkspace`'s `Package.resolved` by hand
8081
- **PVQuicklookSupport** — iOS and macOS Quicklook api support code
8182
- **PVRcheevos** — RetroAchievements C client integration
8283
- **PVSettings** — User preferences
@@ -425,7 +426,7 @@ Agents MUST run these checks before creating a PR. Do NOT skip any step.
425426

426427
5. **No magic numbers** — Extract constants. Don't hardcode values that are used in multiple places.
427428

428-
6. **Use `SystemIdentifier` enum, not raw strings** — Never compare system identifiers using raw string literals like `"com.provenance.n64"`. Use the `SystemIdentifier` enum from `PVPrimitives`:
429+
6. **Use `SystemIdentifier` enum, not raw strings** — Never compare system identifiers using raw string literals like `"com.provenance.n64"`. Use the `SystemIdentifier` enum from `PVSystems`:
429430

430431
```swift
431432
// ❌ WRONG — fragile, typo-prone, no compile-time safety
@@ -458,7 +459,7 @@ Agents MUST run these checks before creating a PR. Do NOT skip any step.
458459
if ([self.systemIdentifier isEqualToString:PVAtariSTSystemIdentifier]) { ... }
459460
```
460461
461-
The `SystemIdentifier` enum is in `PVPrimitives/Sources/PVSystems/SystemIdentifier.swift`. Import `PVPrimitives` to use it. `systemIdentifier` on the core (`PVEmulatorCore`) is a `String?`.
462+
The `SystemIdentifier` enum lives in the PVSystems package (github.com/Provenance-Emu/PVSystems, shared with iCube and iFly). `import PVSystems`, and give the target `.product(name: "PVSystems", package: "PVSystems")`. `systemIdentifier` on the core (`PVEmulatorCore`) is a `String?`.
462463
463464
7. **Type safety** — Check that optional unwrapping is correct (no double-optionals from `?.` chains). Check that enum cases exist before referencing them. Check that function signatures match call sites.
464465

‎DEVELOPER.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ If your source lives in a new Swift package target, add it to `PVLookup/Package.
659659
```swift
660660
.target(
661661
name: "MyNewDB",
662-
dependencies: ["PVLookupTypes", "PVSQLiteDatabase", "PVSystems", "PVLogging"],
662+
dependencies: ["PVLookupTypes", "PVSQLiteDatabase", .product(name: "PVSystems", package: "PVSystems"), "PVLogging"],
663663
path: "Sources/MyNewDB"
664664
),
665665
```

0 commit comments

Comments
 (0)