BlueHuskyStudios / BlueHuskyStudios/DeadassSimpleMediaPlayer
`PlayerSession`'s public API differs between Debug and Release
- Dominant language
- Swift
- Stars
- 0
- Forks
- 3
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 9
Description
```swift
#if DEBUG
public var history = PlaybackHistory()
#else
public private(set) var history = PlaybackHistory()
#endif
```
Same for `savedPlaylists`. The access level — and the doc comment, which only exists on the `#else` branch — changes with build configuration. This exists solely so `PlayerSession.demo` can assign to them.
The cost is that Debug and Release are no longer the same API, so a mistake that compiles in Debug can fail the Release build. A debug-only `init` (or a single `#if DEBUG` method like `applyDemoData(...)`) would keep one public surface.
Contributor guide
Research direction
Start with PlayerSession and the PlayerSession.demo path, then inspect how history and savedPlaylists are assigned in Debug builds. Keep the public API and documentation consistent between Debug and Release while preserving demo data setup, and verify both build configurations compile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100