Skip to content

createAnnotatedEnumSerializer and createSimpleEnumSerializer functions must be made ABI-public #2703

@broadwaylamb

Description

@broadwaylamb

These functions:

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions