Skip to content

Conversation

@matt-ramotar
Copy link
Collaborator

@matt-ramotar matt-ramotar commented Aug 10, 2025

kotlinx-datetime:0.7.0 removed Clock/Instant in favor of kotlin.time.Clock/Instant (requires Kotlin 2.1). Store still referenced kotlinx.datetime.Clock, so builds break when consumers pull in 0.7.0. See #703.

To move to kotlinx-datetime:0.7.0, we would need to move to Kotlin 2.1. The issue is that KMMBridge isn't aligned with Kotlin 2.1 (our other build plugins are, example CI failure).

Potential paths forward:

  • (A) Replace kotlinx-datetime with our own method for epoch milliseconds. Store's public API only exposes epoch milliseconds. kotlinx.datetime.Instant is not in public types. This enables us to resolve the issue without bumping Kotlin or dropping KMMBridge.
  • (B) Move to Kotlin 2.1, replace usages with kotlin.time.Clock, and align build plugins. This would require us to either drop KMMBridge, request a bump upstream, or temporarily maintain a fork of it.

This PR is implementing path A, which unblocks consumers immediately without requiring Kotlin 2.1, changes to KMMBridge, or any changes to our public API.

Signed-off-by: Matt Ramotar <[email protected]>
@itsandreramon
Copy link

when is this fix scheduled for release? is there a way to test nightly builds? @matt-ramotar

@matt-ramotar
Copy link
Collaborator Author

bugbot run

cursor[bot]

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Aug 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.17%. Comparing base (d7af217) to head (bb5c087).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #706      +/-   ##
==========================================
+ Coverage   79.12%   79.17%   +0.04%     
==========================================
  Files          40       42       +2     
  Lines         939      941       +2     
  Branches      169      169              
==========================================
+ Hits          743      745       +2     
  Misses        120      120              
  Partials       76       76              
Files with missing lines Coverage Δ
...tion/store/store5/impl/extensions/Clock.android.kt 100.00% <100.00%> (ø)
...nativefoundation/store/store5/StoreWriteRequest.kt 100.00% <100.00%> (ø)
...vefoundation/store/store5/impl/extensions/Clock.kt 100.00% <100.00%> (ø)
...undation/store/store5/impl/extensions/Clock.jvm.kt 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matt-ramotar matt-ramotar merged commit cbcb457 into main Aug 16, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in Store Roadmap Aug 16, 2025
@matt-ramotar matt-ramotar deleted the matt-ramotar/deps/dt branch August 16, 2025 11:42
@tyvsmith
Copy link
Member

@gpolak did a big Clock convergence exercise internally, and may have some thoughts on long-term direction here.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants