Skip to content

KSP: a top-level function in the root package produces an unresolved reference in the generated fragment #319

Closed

Description

@b-re-w

Found while building fixtures/ios-consumer (#90). A public top-level 'fun runProbe()' with no package declaration is exported; the generated fragment (package python.multiplatform.generated.fragments) calls 'runProbe()' unqualified, and Kotlin cannot import a root-package declaration, so compileKotlin fails: 'Unresolved reference runProbe'. Completion: either bind root-package declarations correctly (e.g. generate the fragment for them in the root package) or skip them with a KSP warning naming the declaration; a processor test with a root-package function, red before.

Activity

  1. added a commit that references this issue on Oct 25, 2026
  2. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #325: root-package declarations are skipped with a KSP warning (they cannot be named from generated code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions