Hey, I am currently updating a compiler-plugin to...
# compiler
j
Hey, I am currently updating a compiler-plugin to 1.8 and I get following error:
This API is not available after FIR
when calling
IrPluginContext.referenceClass
. Why is this an error and how do I fond out how to migrate to the new API?
j
If you just want to unblock yourself, you can add
@OptIn(FirIncompatiblePluginAPI::class)
which is what JetBrains is doing to upgrade the Compose compiler to 1.8: https://github.com/JetBrains/androidx/pull/369/commits/9fdfbf34973a06a744d46c17c08affc89ec354c4#diff-db0f368313678ee559634ea9c8820667f5430e6e592ef0cce31e67d59413912dR206
Also the inconsistency of casing acronyms in
Fir
and
API
really bothers me...
z
You didn’t link much detail but I suspect you’re using
IrPluginContext.referenceClass(FqName)
and the replacement is just to use
IrPluginContext.referenceClass(ClassId)
. It’s pretty easy to update