Skip to content
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

Replace custom time handling with kotlin.time.TimeSource #260

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Replace custom time handling with kotlin.time.TimeSource #260

merged 3 commits into from
Feb 21, 2024

Conversation

hfhbd
Copy link
Contributor

@hfhbd hfhbd commented Feb 10, 2024

This is a binary breaking change.

The current implementation of TagConsumer.measureTime uses a custom time implementation. With Kotlin 1.9, TimeSource is finally stable so we can use it instead. This also allows us to use TimedValue.

Another advantage: The standard lib also provides a TimeSource.Monotonic for WASI, so adding WASI support removes the need to implement currentTimeMillis by ourself.


data class TimedResult<T>(val result: T, val time: Long)
val <O : Appendable> TimedValue<O>.out: O
Copy link
Contributor Author

@hfhbd hfhbd Feb 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this extension? 🤔 You can call result/value directly.

src/commonMain/kotlin/trace-consumer.kt Outdated Show resolved Hide resolved
src/commonMain/kotlin/trace-consumer.kt Outdated Show resolved Hide resolved
@e5l e5l merged commit f1b51c6 into Kotlin:master Feb 21, 2024
1 check passed
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jan 15, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
| [org.postgresql:postgresql](https://jdbc.postgresql.org)
([source](https://github.com/pgjdbc/pgjdbc)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `42.7.4` -> `42.7.5` |
|
[org.jetbrains.kotlinx:kotlinx-html-jvm](https://github.com/Kotlin/kotlinx.html)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`0.11.0` -> `0.12.0` |
| [org.jooq:jooq](http://www.jooq.org)
([source](https://github.com/jOOQ/jOOQ)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `3.18.24` -> `3.18.25`
|
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`1.45.0` -> `1.45.1` |
| [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`1.45.0` -> `1.45.1` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.51` -> `2.29.52` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.51` -> `2.29.52` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.51` -> `2.29.52` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.51` -> `2.29.52` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.51` -> `2.29.52` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.51` -> `2.29.52` |

---

### Release Notes

<details>
<summary>Kotlin/kotlinx.html
(org.jetbrains.kotlinx:kotlinx-html-jvm)</summary>

###
[`v0.12.0`](https://github.com/Kotlin/kotlinx.html/releases/tag/0.12.0)

#### What's Changed

- Added HTML templates by [@&#8203;e5l](https://github.com/e5l) in
Kotlin/kotlinx.html#255
- Replace usage js with WasmJs in README.md by
[@&#8203;e5l](https://github.com/e5l) in
Kotlin/kotlinx.html#257
- Improve Gradle build logic by
[@&#8203;hfhbd](https://github.com/hfhbd) in
Kotlin/kotlinx.html#258
- Use kotlin.test everywhere by
[@&#8203;hfhbd](https://github.com/hfhbd) in
Kotlin/kotlinx.html#259
- Replace custom time handling with kotlin.time.TimeSource by
[@&#8203;hfhbd](https://github.com/hfhbd) in
Kotlin/kotlinx.html#260
- Add contracts to node append and tag declaration calls by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#264
- Added "as" attribute for Link tag by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#265
- Added IE-specific values for textarea wrap attribute by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#266
- Reducing the amount of compiler warnings in gen-enums.kt by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#269
- Added "referrerpolicy", "media", and "download" attributes for "a" tag
by [@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#270
- Fixing typo in area attribute by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#271
- Updating Github Actions and enabling cross-platform testing by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#272
- Improving Tag Generation by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#274
- Added srcset attribute to "source" tag by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#273
- Added "auto" value for "dir" attribute by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#275
- Upgrading Kotlin to 2.0.0 by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#282
- Reworked the validation of attribute names to better correspond to
HTML standards by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#276
- Make attribute traits inheritable by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#280
- Using correct string type for input attribute "autocomplete" by
[@&#8203;severn-everett](https://github.com/severn-everett) in
Kotlin/kotlinx.html#278
- Support android native targets and wasm-wasi by
[@&#8203;whyoleg](https://github.com/whyoleg) in
Kotlin/kotlinx.html#288

#### New Contributors

- [@&#8203;hfhbd](https://github.com/hfhbd) made their first
contribution in Kotlin/kotlinx.html#258
- [@&#8203;whyoleg](https://github.com/whyoleg) made their first
contribution in Kotlin/kotlinx.html#288

**Full Changelog**:
Kotlin/kotlinx.html@0.11.0...0.12.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 3e633633f6599555fd8c75c49d915b16242cac27
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