There are few reasons why fake overrides should not be printed:
1. Fake overrides are not serialized in metadata. So, if one will run
"dump-metadata" they won't see there any fake overrides. Neither
their signatures. It would be inconsistent if
"dump-metadata-signatures" command would show them.
2. In order to properly build fake overrides the KLIB tool needs
the dependency library with the super class or interface, which
is not available unless this is stdlib or one of the built-in
Kotlin/Native platform libraries. KLIB tool does not support any
reasonable means for passing dependencies through CLI arguments.
If such possibility is added in the future, it would be the
right time to support printing fake overrides (probably under
a separate CLI option).
^KT-62340
Don't print signatures computed for private declarations. This
effectively means that only signatures for `public`, `protected`,
and `internal` declarations will be printed.
Note: This new behavior is intact with `dump-ir-signatures` command.
^KT-62340
With `KlibToolOutput` it's possible to forward the output of each
KLIB tool's command to either system stdout/stderr streams or to
some buffers which then can be read by tests.
^KT-62340
This is an option that allows running the commands that support it
in a special "test mode". The "test mode" means (but not limited to)
that a command may, for example, sort the output which is unsorted
by default, and this way guarantee stable output. This is essentially
helpful for tests, which rely on the command output.
^KT-62340
What's done:
- Reduce the visibility of all entities inside the module to `internal`
or `private`. Only leave `fun main()` as `public` because it's the
single legal entry point.
- Add comments to few classes related to "contents" command that they
should be removed together with the command after 2.0.
- Drop useless `DeclarationHeaderRenderer` interface.
- Rename: KlibToolLinker -> KlibToolIrLinker
^KT-62340
Change package, artifact group, artifact name, and Gradle module name to
kotlin-metadata and kotlin-metadata-jvm, respectively.
In Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is
a part of Kotlin distribution now.
Note that kotlinx-metadata-klib is left with org.jetbrains.kotlinx group, artifact name and package
because -klib part is considered not stable and for internal use. Since it is still published via Sonatype,
it should have kotlinx group. Therefore, it will have both classes from kotlin.metadata and kotlinx.metadata packages. This is not a problem, because we already had kotlinx.metadata split package between -jvm and -klib before.
#KT-63219 Fixed