Skip to content

Conversation

@eggfly
Copy link

@eggfly eggfly commented Oct 24, 2024

I also faced this problem:

This commit fixes this.

Copy link
Contributor

@SvyatoslavScherbina SvyatoslavScherbina left a comment

Choose a reason for hiding this comment

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

Sorry for the delay! Could you please also rebase the branch?

private val hiddenFromObjCAnnotation = FqName("kotlin.native.HiddenFromObjC")

private fun hasHiddenAnnotation(descriptor: Annotated): Boolean {
return descriptor.annotations.hasAnnotation(hiddenFromObjCAnnotation)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a comment explaining the purpose of this condition and the trade-off.

I mean, it checks for HiddenFromObjC while C export has nothing to do with Objective-C, which might be confusing for anyone reading this code.
It is also a bit of a hack, but we decided that it is acceptable. Still, worth mentioning.

@eggfly eggfly closed this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants