Skip to content

Conversation

jonathannorris
Copy link
Member

@jonathannorris jonathannorris commented Aug 27, 2025

  • Root cause: Data race on DVCConfig.userConfig between main-thread writes and background reads, causing intermittent objc_retain crashes.
  • Solution:
    • Add concurrent queue with barrier writes and synchronized reads for DVCConfig.userConfig.
    • Post NEW_USER_CONFIG notifications on the main thread.
    • Include test JSON fixtures in SwiftPM test target and load via Bundle.module.

Changes

  • DevCycle/Models/DVCConfig.swift: thread-safe accessor for userConfig; main-thread notifications.
  • Package.swift: process DevCycleTests/Models/test_config.json and ..._eval_reason.json as resources.
  • DevCycleTests/Utils/GetTestConfig.swift: use Bundle.module for SPM.

Testing

  • Ran swift test: 155/155 tests passing.

Impact

  • No public API changes.
  • Safer concurrent access; eliminates observed crashes in allVariables()/getVariable().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant