Skip to content

Bump kotlin-logging to 8.0.7 and Kotlin to 2.0.21 - #438

Merged
oshai merged 1 commit into
jasync-sql:masterfrom
ivan-nekrasov:chore/update-kotlin-logging
Nov 14, 2026
Merged

oshai merged 1 commit into
jasync-sql:masterfrom
ivan-nekrasov:chore/update-kotlin-logging

Conversation

@ivan-nekrasov

@ivan-nekrasov ivan-nekrasov commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Related to #437.

Bumps kotlin-logging from 5.0.0 to 8.0.7 and updates logging calls to the new API. kotlin-logging is now an implementation dependency in all modules, since loggers are private and it isn't part of the public API.

Kotlin is bumped from 1.8.21 to 2.0.21 to read the dependency's newer Kotlin metadata. The JVM target remains Java 8.

Tested locally on Java 8: 425 tests passed, 9 skipped. The Unix socket test passed separately on Linux.

@oshai

oshai commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR!

One thing I noticed while reviewing is how this affects the minimum Kotlin version for downstream consumers:
Currently jasync-sql is built with Kotlin 1.8.21, so Kotlin 1.7+ consumers can read its metadata. Also, 4 modules (mysql-async, postgresql-async, postgis-jasync, r2dbc-mysql) currently declare kotlin-logging-jvm as api(...) instead of implementation(...), even though all loggers are private (pool-async and db-async-common already use implementation).

Since kotlin-logging 8.x is compiled with Kotlin 2.1.21 (2.1 metadata), we have a few options:

Option A (keep current Kotlin floor):
Keep KOTLIN_VERSION=1.8.21, bump kotlin-logging to 6.0.9, and change api to implementation in those 4 modules.
- Keeps the consumer compiler floor at Kotlin 1.7+ while still keeping all the logging call-site updates in this PR.

Option B (moderate bump):
Bump KOTLIN_VERSION=2.0.21, bump kotlin-logging to 8.0.7 (latest 8.x), and change api to implementation in those 4 modules.
- Hides kotlin-logging's 2.1 metadata from consumers' compile classpaths, so jasync-sql only exposes 2.0 metadata (compatible with Kotlin 1.9+, including Spring Boot 3.x, dropping only Kotlin 1.7/1.8). We would release this as 2.3.0 rather than a 2.2.x patch.

Option C (PR as-is):
KOTLIN_VERSION=2.0.21 with kotlin-logging 8.0.4 exposed as api(...).
- Leaks transitive kotlin-stdlib 2.1.21 onto consumers' compile classpaths, raising the minimum consumer compiler to Kotlin 2.0+ (breaking Kotlin 1.9.x users).

I tend toward Option B (plus rebasing on latest master, which has a small conflict from a recent merge). What is your opinion?

@ivan-nekrasov
ivan-nekrasov force-pushed the chore/update-kotlin-logging branch from d96d302 to 902dd3f Compare November 14, 2026 10:00
@ivan-nekrasov
ivan-nekrasov force-pushed the chore/update-kotlin-logging branch from 902dd3f to d0886d2 Compare November 14, 2026 10:06
@ivan-nekrasov ivan-nekrasov changed the title Bump kotlin-logging to 8.0.4 and Kotlin to 2.0.21 Bump kotlin-logging to 8.0.7 and Kotlin to 2.0.21 Nov 14, 2026
@ivan-nekrasov

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review! Agreed on Option B: bumped Kotlin to 2.0.21 and kotlin-logging to 8.0.7, and switched kotlin-logging to implementation in the 4 modules. 2.3.0 sounds right

@oshai
oshai merged commit d5c4056 into jasync-sql:master Nov 14, 2026
1 check passed
@oshai

oshai commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Merged and released in 2.3.0: https://github.com/jasync-sql/jasync-sql/releases/tag/2.3.0

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