-
Notifications
You must be signed in to change notification settings - Fork 76
migration from kotlinx.datetime.Instant -> kotlin.time.Instant #1368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ff9e441
to
cb54b43
Compare
cb54b43
to
c5786cd
Compare
Check these functions too please:
What should we do about them? For transparency, i suppose these things change:
|
Nope :) I made it
These I replaced with
Yep :) should be fine
Mmm yes you're right. I think the --opt-in is fine. Kotlinx DateTime is always considered experimental, so requiring OptIn can be expected. If you try this in notebooks, you will get an exception that you need "--opt-in". I think it's up to the notebook team to provide a small guide for how to do that. It will likely come up moreoften, in other libraries too.
yes... that's true. On the other hand, we need to make the switch at some point right? It could be possible to also do this in a cycle; similar to |
Got it, didn't notice import changed.
Ah ok, so we expose api without kotlinx.datetime.Instant? Like, if someone used to have only dataframe dependency and import it, now it becomes red code? I'm asking so we can compile a little list of "what changed"
Normally people explicitly use experimental api in their code and see the warning/error. DataFrame produces Instant as a result of non-experimental operation and then codegeneration fails with exception. I think this is what makes difference =( |
Well yes :/ unfortunately kotlinx.datetime pushes us in that direction. They deprecated the old Instant before the new one is stable... But you're right, we say our API is stable by declaring a beta, so we should probably honor that and go with a safe route, which means:
would this approach be better? :) |
I don't like |
@AndreiKingsley |
…ia api()" This reverts commit 0a2580e.
dd0f88d
to
c2786c2
Compare
Ok, just a bit of a strange transition scheme (on their part). |
812a0d8
to
3fe2f23
Compare
That's true, but then again, how often does it happen you need to deprecate something because it's added to the standard library? Compatibility nightmare XD Better to be explicit about it. Hopefully the path will be easier whenever LocalDate(Time) gets added to the stdlib at some point :) |
3fe2f23
to
8550bd9
Compare
…edInstant -> Instant. Also ParserOptions.parseExperimentalInstant
8550bd9
to
efb0adc
Compare
77df7c8
to
e8245f9
Compare
# Conflicts: # core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt # core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/format.kt # core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt # docs/StardustDocs/resources/modify/operations/formatExample_properties.html # docs/StardustDocs/resources/modify/operations/formatExample_strings.html
e8245f9
to
d98059d
Compare
…stant to ease the transition
8b72182
to
85ca57f
Compare
Alright I did:
Specifically I made the I also added some helper-conversions from the deprecated instant to stdlib instant to ease the transition a bit. A similar thing was done for the ColTypes, used by |
Fixes #1350
0.7.1-0.6.x-compat
to ease the transition to the new version. OldInstant
s are still supported in conversions, but not the default anymore.