redacted-compiler-plugin icon indicating copy to clipboard operation
redacted-compiler-plugin copied to clipboard

Prepare for K2

Open ZacSweers opened this issue 1 year ago • 8 comments

ZacSweers avatar Nov 20 '23 19:11 ZacSweers

Diagnostic renders keep getting punted https://youtrack.jetbrains.com/issue/KT-53510

ZacSweers avatar Feb 03 '24 21:02 ZacSweers

I've released 1.8.0-alpha01 with the changes in the PR up to this point

Notes

  • Targets Kotlin 2.0.0-Beta3

ZacSweers avatar Feb 03 '24 21:02 ZacSweers

Updated based on https://github.com/JetBrains/kotlin/blob/master/compiler/fir/checkers/module.md#platform-and-common-checkers

ZacSweers avatar Feb 14 '24 02:02 ZacSweers

Published 1.8.0-alpha02 with support for Kotlin 2.0.0-Beta4

ZacSweers avatar Feb 14 '24 02:02 ZacSweers

jfyi, updated to 2.0.0-RC1 and compilation fails with the following error

> Task :shared:compileKotlinJs FAILED
e: java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl.<init>(int, int, org.jetbrains.kotlin.ir.types.IrType, org.jetbrains.kotlin.ir.symbols.IrValueSymbol, org.jetbrains.kotlin.ir.expressions.IrStatementOrigin, int, kotlin.jvm.internal.DefaultConstructorMarker)'
        at dev.zacsweers.redacted.compiler.RedactedIrVisitor.IrGetValueImpl(RedactedIrVisitor.kt:219)
        at dev.zacsweers.redacted.compiler.RedactedIrVisitor.receiver(RedactedIrVisitor.kt:216)
        at dev.zacsweers.redacted.compiler.RedactedIrVisitor.generateToStringMethodBody(RedactedIrVisitor.kt:192)
        at dev.zacsweers.redacted.compiler.RedactedIrVisitor.convertToGeneratedToString(RedactedIrVisitor.kt:145)
        at dev.zacsweers.redacted.compiler.RedactedIrVisitor.visitFunctionNew(RedactedIrVisitor.kt:121)
        at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitFunction(IrElementTransformerVoidWithContext.kt:83)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:128)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:131)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:19)
        at org.jetbrains.kotlin.ir.declarations.IrSimpleFunction.accept(IrSimpleFunction.kt:36)

sureshg avatar Apr 09 '24 17:04 sureshg

Just published 1.8.0-alpha03 with support for 2.0.0-RC1 and also avoided using the above impl type directly to hopefully avoid future issues.

ZacSweers avatar Apr 10 '24 22:04 ZacSweers

I've just published 1.8.0-alpha04. Two additions since the last alpha

  • Support for custom error messages in FIR diagnostics. Should show up in the IDE and command line. However, in my testing I don't see the IDE showing these. Maybe in future versions
  • Published using KSP2 to build.

ZacSweers avatar Apr 12 '24 22:04 ZacSweers

I've published 1.9.0-alpha01 with the new @Unredacted + interfaces features released in 1.8.0.

ZacSweers avatar Apr 23 '24 19:04 ZacSweers

I've published 1.9.0-alpha02 with full support for validation in FIR with all the features on main (they were only partially implemented before). This also disables that validation during IR by default. This is also built against 2.0.0-RC3 and on the latest changes from main.

ZacSweers avatar May 12 '24 19:05 ZacSweers