typesafegithub / typesafegithub/github-workflows-kt
`Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl`
Nessuno ha ancora preso questa issue.
- Lingua principale
- Kotlin
- Stelle
- 664
- Fork
- 30
- Merge medio
- 4g 19h
- PR unite (30g)
- 5
Descrizione
Component
- github-workflows-kt (library with the DSL)
- bindings server (https://bindings.krzeminski.it)
- I don't know
Action
Just run CI for this project - looking at the step, it's about compiling the script: https://github.com/typesafegithub/github-workflows-kt/actions/runs/27213769566/job/80485705899
Expected
Succeeds.
Actual
Fails with
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
Most likely related to a bug in Kotlin 2.4.0, see KT-86352. Slack thread: https://kotlinlang.slack.com/archives/C0BT46EL8/p1780927673531079?thread_ts=1773078486.658489&cid=C0BT46EL8
Workaround, if exists
In your workflow, add:
@file:DependsOn("fwilhe2:setup-kotlin:v1")
import io.github.typesafegithub.workflows.actions.fwilhe2.SetupKotlin
// ...
workflow(
// ...
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
// ...
additionalSteps = {
uses(
name = "Downgrade Kotlin",
action = SetupKotlin(
// One version before 2.4.0 that contains a bug leading to this failure:
// While analysing .github/workflows/build.main.kts:53:13:
// org.jetbrains.kotlin.utils.exceptions.KotlinIllegalArgumentExceptionWithAttachments:
// Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl
// This downgrade is meant to be a temporary workaround.
version = "2.3.21",
),
)
},
),
Example PR: https://github.com/typesafegithub/github-workflows-kt/pull/2350
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Start with the linked CI run and .github/workflows/end-to-end-tests.main.kts, especially line 37. Compare the Kotlin 2.4.0 failure with the documented 2.3.21 workaround, then review KT-86352 and PR #2350. Done means the workflow compiles and CI succeeds without the reported FIR error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github-actions, kotlin
- Ambito
- ci-cd
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100