createAnnotatedEnumSerializer
and createSimpleEnumSerializer
functions must be made ABI-public
#2703
Labels
createAnnotatedEnumSerializer
and createSimpleEnumSerializer
functions must be made ABI-public
#2703
These functions:
kotlinx.serialization/core/commonMain/src/kotlinx/serialization/internal/Enums.kt
Line 83 in 4bf4113
kotlinx.serialization/core/commonMain/src/kotlinx/serialization/internal/Enums.kt
Line 54 in 4bf4113
are
internal
, but the kotlinx.serialization compiler plugin generates calls to these functions in user code. This is access violation.Why this is important to us (the Kotlin compiler team): we're trying to enable visibility checks during IR validation in the compiler. Basically, these checks try to ensure that e.g. an internal function is only ever called from the same module it's declared in. We're trying to enable these checks in compiler tests, however, the kotlinx.serialization-related tests are failing because of access violations.
We suggest annotating these functions (and potentially other
internal
functions, calls to which may be emitted into user code by the compiler plugin) as@PublishedApi
, or making them public.The text was updated successfully, but these errors were encountered: