binary-compatibility-validator icon indicating copy to clipboard operation
binary-compatibility-validator copied to clipboard

File annotations should be copied to `ClassBinarySignature`

Open dovchinnikov opened this issue 1 year ago • 4 comments

Without this, file annotations are not considered when filtering the classes with non-public markers. Please find the reproducer in the attached pull request.

dovchinnikov avatar Jan 08 '24 12:01 dovchinnikov

File-targeting annotations (@file:..) seem to be only emitted for file-facade classes, and in all other cases, they are just lost.

If a file contains top-level declarations and has some @file-annotation registered as a non-public marker, a facade class generated to hold these declarations will be filtered out from the dump.

fzhinkin avatar Jan 09 '24 13:01 fzhinkin

I understand how it behaves at the moment.

I'm arguing that non-public marker on file-level should affect the whole file, including types defined in the file.

dovchinnikov avatar Jan 09 '24 13:01 dovchinnikov

I mean, there's no info about such an annotation (except the file-facade case), so there's nothing we can do on the BCV side at the moment. Trying to figure out how @file-annotations are supposed to work (and if they are supposed to work the way they do).

fzhinkin avatar Jan 09 '24 14:01 fzhinkin

Corresponding YT issue: https://youtrack.jetbrains.com/issue/KT-64981

fzhinkin avatar Jan 15 '24 15:01 fzhinkin

As part of the migration of separate BCV functionality to Kotlin Gradle Plugin, the addition of new features to a separate plugin has been discontinued.

The issue moved to YouTrack.

shanshin avatar Jun 13 '25 19:06 shanshin