mill icon indicating copy to clipboard operation
mill copied to clipboard

Kotlin incremental compilation: does not work with generated sources such as from dagger, databinding, hilt

Open vaslabs opened this issue 1 week ago • 1 comments

Found this issue in our compose samples with mill testing repo. It seems that generated sources by both ksp and databinding don't seem to work.

For now the workaround is to disable the incremental compilation with:

  override def kotlincUseBtApi: T[Boolean] = Task {
    false
  }

but maybe there's a fix for this. Opening the issue to investigate

vaslabs avatar Dec 12 '25 08:12 vaslabs

I think this is related to this . Do you recall @lefou ?

feels like the change here causes the same issue, I'll test it now

EDIT:

I put a relevant PR (https://github.com/com-lihaoyi/mill/pull/6381) although perhaps it needs to be done a bit differently (before it has passing an empty list in the place of sources)

EDIT2:

I think this was an issue with mixed compilation instead, the generated sources in the above cases are java files

vaslabs avatar Dec 12 '25 08:12 vaslabs

I guess the BT-API is not very intuitive or some kind of "grown this way".

lefou avatar Dec 15 '25 09:12 lefou

Closed by #6381

lefou avatar Dec 15 '25 11:12 lefou