-
Notifications
You must be signed in to change notification settings - Fork 67
Klib .api
files could use some vertical spacing
#196
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
Comments
It might be nice to separate constructors, properties, and functions, too.
|
Wouldn't it be to "noisy" for a stride of single-line declarations? Like here: +
// Targets: [js]
final const val app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArray$stableprop // app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArray$stableprop|#static{}app_cash_redwood_protocol_guest_JsArray$stableprop[0]
+
// Targets: [js]
final const val app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArrayList$stableprop // app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArrayList$stableprop|#static{}app_cash_redwood_protocol_guest_JsArrayList$stableprop[0]
+
// Targets: [js]
final const val app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsMap$stableprop // app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsMap$stableprop|#static{}app_cash_redwood_protocol_guest_JsMap$stableprop[0] |
Initially I didn't actually realize these weren't sections but are instead headers on a single declarations. I edited the original from "Target group" to "Target header" after the fact. I do think it's better spaced out than not, even with the target comment. This file is text-based, so it's for humans on some level as well as the tool and visually I think that's much easier to parse. Especially given the lines are so long. You either need to correctly track which line you're on when you scan to the next one (which is proven harder as the lines get longer) or they're going to be wrapped and the separation will be nice. Plus you can make // Targets: [js]
final const val app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArray$stableprop // app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArray$stableprop|#static{}app_cash_redwood_protocol_guest_JsArray$stableprop[0]
// Targets: [js]
+final const val app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArrayList$stableprop // app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsArrayList$stableprop|#static{}app_cash_redwood_protocol_guest_JsArrayList$stableprop[0]
+// Targets: [js]
final const val app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsMap$stableprop // app.cash.redwood.protocol.guest/app_cash_redwood_protocol_guest_JsMap$stableprop|#static{}app_cash_redwood_protocol_guest_JsMap$stableprop[0] |
Example from IJ https://github.com/JetBrains/intellij-community/blob/master/platform/util/diff/api-dump.txt Format:
Modifiers:
|
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes.
Also, update the dump to reflect the actual state of the Gradle plugin. Reorders entries in the dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 Removes internal constants from the dump: Kotlin/binary-compatibility-validator#90 Fixes #248
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes.
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes. Cherry-picked from 46f406d
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes. Cherry-picked from 46f406d Co-authored-by: Alexander Likhachev <alikhachev@users.noreply.github.com>
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes.
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes.
Also, update the dump to reflect the actual state of the Gradle plugin. Reorders entries in the dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 Removes internal constants from the dump: Kotlin/binary-compatibility-validator#90 Fixes #248
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706 Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243 Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196 The entries are only reordered, but contain no significant changes.
This will make them visually easier to parse, but should also aid in diffing.
Examples:
Top-level types should be separated by a single vertical whitespace
abstract fun interface app.cash.redwood.protocol/ChangesSink { // app.cash.redwood.protocol/ChangesSink|null[0] abstract fun sendChanges(kotlin.collections/List<app.cash.redwood.protocol/Change>) // app.cash.redwood.protocol/ChangesSink.sendChanges|sendChanges(kotlin.collections.List<app.cash.redwood.protocol.Change>){}[0] } + abstract fun interface app.cash.redwood.protocol/EventSink { // app.cash.redwood.protocol/EventSink|null[0] abstract fun sendEvent(app.cash.redwood.protocol/Event) // app.cash.redwood.protocol/EventSink.sendEvent|sendEvent(app.cash.redwood.protocol.Event){}[0] }
Nested types should be prefixed with a single vertical whitespace
Target headers should be separated with a single vertical whitespace
The text was updated successfully, but these errors were encountered: