cats-effect icon indicating copy to clipboard operation
cats-effect copied to clipboard

Sync `SyncIO.realTime*` methods with `Clock` implementation

Open satorg opened this issue 1 month ago • 4 comments

Otherwise, Clock[SyncIO].realTimeInstant might not be the same as SyncIO.realTimeInstant. Discussed on Discord.

Also adds SyncIO.realTimeZonedDateTime, similar to IO.realTimeZonedDateTime.

satorg avatar Nov 05 '25 07:11 satorg

Hmm... The CI failure doesn't seem relevant to me:

[error] sbt.librarymanagement.ResolveException: Error downloading org.typelevel:cats-effect-laws_3:3.5.2
[error]   Not found

satorg avatar Nov 05 '25 07:11 satorg

In theory we could split this into 2 parts: the fix, and the new method. The fix could go into 3.6.x. (But I'm not sure it's worth it.)

durban avatar Nov 06 '25 15:11 durban

I can create a separate PR without realTimeZonedDateTime, if necessary. This one could go 3.7, the other one would go straight to 3.6 then. Just let me know what works the best. Thank you!

satorg avatar Nov 06 '25 21:11 satorg

Honestly, I'm not sure it's worth the hassle. You seem to be the first to notice the bug, so if you don't need the fix in 3.6.x, then let's leave this as it is. (I mean the PR is fine as it is.)

durban avatar Nov 07 '25 17:11 durban