Skip to content

Reimplement datetime for Darwin in pure Kotlin #73

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

Merged
merged 5 commits into from
Jan 18, 2021
Merged

Conversation

dkhalanskyjb
Copy link
Collaborator

Use of HMPP allows providing a source-set for all the Darwin targets, which means that it's possible to avoid building an explicit bridge between the pure Kotlin implementation and native bindings for the corresponding platforms.

Additionally, use of cinterop is overall optimized by running it conditionally depending on the target platform. This makes it possible to get rid of C++ preprocessor magic almost entirely.

Now the builds for different native targets are decoupled and it's
possible to remove the workarounds that were needed to combine at
times incompatible requirements imposed by different platforms.
The boundaries between the common native code and the
platform-specific implementation is now less ad-hoc.
Before, some names mapping to fixed-offset timezones were
parsed as `TimeZone` in Java and JS implementations, but
`ZoneOffset` on Native.
Darwin calls the 0-offset timezones "GMT" while we preserve the
name passed by the user.
The code that was written in Objective-C++ is now moved more or
less verbatim to Kotlin. This is just the first stage of the port,
as some things can be further simplified given how the boundaries
between the platforms are no longer an issue.
@dkhalanskyjb dkhalanskyjb requested a review from ilya-g November 27, 2020 09:27
@dkhalanskyjb dkhalanskyjb merged commit 978ae2f into master Jan 18, 2021
@dkhalanskyjb dkhalanskyjb deleted the better-hmpp branch May 17, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants