Kotlin / Kotlin/dataframe

IDE does not suggest importing accessors (from other packages)

Open
#1,455 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Compiler plugin
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Given:

package a

@DataSchema
interface Person {
    val name: String
}

open class TestA {
    val dfA: DataFrame<Person> get() = dataFrameOf("name")("a").cast<Person>()

    init {
        dfA.name // works, no import necessary
    }
}

class TestB : TestA() {
    init {
        dfA.name // works, no import necessary
    }
}

But when DataFrame<Person> is used from another package:

Image

IntelliJ seems to be unaware that it can suggest to import a.name as it doesn't know this is available. Adding it manually does work:

Image

Not sure if this is something we can fix on the compiler plugin side or the IDE somehow :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example with DataFrame and inherited accessors across packages, then determine whether the missing import suggestion originates in the compiler plugin or IDE integration. Trace the relevant integration point and verify that IntelliJ suggests importing a.name for the cross-package case while preserving the working same-package behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.