redhat-et / redhat-et/ripwire

Kotlin Multiplatform `expect`/`actual` calls resolve to nothing

Open
#154 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C++
Stars
2.1k
Forks
125
Avg merge
5h 42m
Merged PRs (30d)
136

Description

## What is wrong

Kotlin Multiplatform code declares `expect class Platform()` in shared code and an
`actual class Platform` per platform. With Kotlin support, both rows count as definitions. A call
from any other directory therefore sees two candidates, neither in its own file nor its own
directory, and is declined — so no edge is built. Fixing it gives every Kotlin Multiplatform
codebase its shared-code call graph back.

## The evidence

On the head of the Kotlin support PR (#126), `--callees` answers a bare `count="0"`, as if nobody
made the call at all. PR #136 (now on `main`) at least counts the call as declined, but it still
binds to nothing.

The cost was measured on ktor: of the 138 Kotlin call pairs that #126's bodyless-type rule moved,
**48 sit on `expect`/`actual` names**.

## Size

**Medium.** The change is one extracted bit (a free padding byte in `Symbol` is already measured),
one predicate change, a parser and cache version bump with their mirrors and pins, a new section in
`test/kotlincheck.sh`, and a ktor measurement.

## Prerequisite

PR #126 (Kotlin support), still open. The prompt describes the code #126 adds and explains how to
confirm the integrated head is in place. The arms it describes go into `test/kotlincheck.sh`, which
#126 adds.

## Where to start

`prompts/help-wanted/kotlin-expect-actual.md` is a self-contained prompt for a coding agent. It
covers why this matters with the measurements, how extraction, the decl/def collapse and resolution
work, a three-file reproduction with recorded output, the design space (a recommended start, an
alternative, and what is rejected), the non-negotiables, red-first acceptance arms, the known traps,
and what the fix PR's description must contain. Like every prompt in `prompts/`, **it ends by
writing a plan and stopping** — a maintainer agrees the plan before any code is written.

Comment here to claim it.

Contributor guide

Open the contributing guide

Research direction

Start with prompts/help-wanted/kotlin-expect-actual.md, then inspect the Kotlin support from PR #126 and its three-file reproduction. Run the red-first acceptance arms in test/kotlincheck.sh and review the parser and cache version mirrors and pins. Done means expect/actual calls resolve and the recorded ktor measurement is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, kotlin, shell
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.