Gleb Minaev
01/30/2025, 1:57 PMDebugLog
compiler plugin from the Brian Norman's series by making it print FQN and the first declaration line number of the function that is modified. For example,
@DebugLog
fun foo() {
...
}
would print
⇢ foo.bar.baz.foo(common.kt:7)()
instead of just
⇢ foo()
I understand how to get FQN of the function. But how do i get the declaration's file and line number? Is it possible to do it from IR plugin?dmitriy.novozhilov
01/30/2025, 2:04 PMIrFile.fileEntry
, which could be used for thatdmitriy.novozhilov
01/30/2025, 2:04 PMIrElement.startOffset/endOffset
are text offsets in the original source fileGleb Minaev
01/30/2025, 2:12 PMJavier
01/30/2025, 4:21 PM