if you get an error like: ```error: while analysin...
# github-workflows-kt
p
if you get an error like:
Copy code
error: while analysing .github/workflows/end-to-end-tests.main.kts:37:5: org.jetbrains.kotlin.utils.exceptions.KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl (end-to-end-tests.main.kts): org.jetbrains.kotlin.util.FileAnalysisException: While analysing .github/workflows/end-to-end-tests.main.kts:37:5: org.jetbrains.kotlin.utils.exceptions.KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl
it's because of a bug in Kotlin 2.4.0. More info: https://github.com/typesafegithub/github-workflows-kt/issues/2348
if you need to work around it in the consistency check job, you can install Kotlin 2.3.x via sth like (not tested):
Copy code
@file:DependsOn("fwilhe2:setup-kotlin:v1")

...

workflow(
    ...
    consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
        additionalSteps = {
            uses(
                name = "Downgrade Kotlin",
                action = SetupKotlin(
                    version = "2.3.21",
                ),
            ),
        },
    ),
) { ... }
v
2.4.10 was just released which fixes this issue indeed. I updated my work-around from downgrading to 2.3.10 to upgrading to 2.4.10 and it works. So as soon as the GHA runner images are updated with the new Kotlin version, the work-around can go away again. 🥳
👍 1