Skip to content

[KT-85690] Fixing deserialization and serialization on jklib pipeline so it actually runs#5892

Merged
KotlinBuild merged 1 commit intomasterfrom
zardilior/fixing-deserialization-and-serialization-on-jklib-pipeline
Apr 21, 2026
Merged

[KT-85690] Fixing deserialization and serialization on jklib pipeline so it actually runs#5892
KotlinBuild merged 1 commit intomasterfrom
zardilior/fixing-deserialization-and-serialization-on-jklib-pipeline

Conversation

@zardilior
Copy link
Copy Markdown
Collaborator

@zardilior zardilior commented Apr 18, 2026

Problem

Currently the serialization and deserialization phases, though declared in the test pipeline doesn't run.

This is due to global defaults not having the right artifact kind which is important for backend phases like deserialization as well as these phases not declaring the right type.

Solution

State Artifact.KLib as the defaultArtifact in global imports and casting in facades and between phases as necessary.

Additional Fix

Using invokeTopLevel in the Facades, rather than using executePhase throws when phases return null but shows no errors.

We are changing this in both Facades:
serialization, SerializationCliJKlibFacade.kt, and deserialization, JKlibIrCompilationCliFacade.kt

It also matches how other Facades in other pipelines work

@kotlin-safe-merge
Copy link
Copy Markdown

kotlin-safe-merge Bot commented Apr 18, 2026

Code Owners

Rule Owners Approval
/​compiler/​jklib.​tests/​ @gkdn, @jDramaix, @kevinoconnor7, @zardilior
@jDramaix
/​compiler/​testData/​ir/​irText/​ kotlin-compiler
@demiurg906

@zardilior zardilior force-pushed the zardilior/fixing-deserialization-and-serialization-on-jklib-pipeline branch 2 times, most recently from 16c6829 to 6bdf902 Compare April 18, 2026 05:59
@zardilior zardilior changed the title Fixing deserialization and serialization on jklib pipeline so it actually runs [KT-85690] Fixing deserialization and serialization on jklib pipeline so it actually runs Apr 18, 2026
)

val compilationArtifact = JKlibIrCompilationPhase.invokeToplevel(phaseConfig, context, serializationArtifact)
val compilationArtifact = JKlibIrCompilationPhase.executePhase(serializationArtifact)
Copy link
Copy Markdown
Collaborator Author

@zardilior zardilior Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using executePhase is better than using invokeTopLevel in the facades, this leverages the natural pipeline structure for error handling. And its consistent with other facades.

We are changing this in both Facades serialization, SerializationCliJKlibFacade.kt, and deserialization, JKlibIrCompilationCliFacade.kt.

@zardilior zardilior marked this pull request as ready for review April 18, 2026 18:52
Comment thread compiler/testData/ir/irText/expressions/fieldAccess_generic.kt
Comment thread compiler/testData/ir/irText/stubs/constFromBuiltins.kt Outdated
Comment thread compiler/testData/ir/irText/expressions/fieldAccess_generic.kt
Comment thread compiler/testData/ir/irText/fakeOverrides/javaBackedCallable.kt Outdated
// ^^^^ member scope of kotlin.Int is different for JVM and JKlib stdlibs

val test = Int.MIN_VALUE
val test = Int.MIN_VALUE No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits: missing new line at the end of the file

@jDramaix
Copy link
Copy Markdown
Collaborator

/safe-merge --fixup

@kotlin-safe-merge kotlin-safe-merge Bot force-pushed the zardilior/fixing-deserialization-and-serialization-on-jklib-pipeline branch from 05a7277 to 6932c1f Compare April 21, 2026 12:12
@KotlinBuild
Copy link
Copy Markdown

Quality gate is triggered at https://buildserver.labs.intellij.net/build/931464799 — use this link to get full insight.

Quality gate was triggered with the following revisions:

kotlin
Branch: refs/merge/GITHUB-5892/safe-merge
Commit: 01ad83d

@KotlinBuild
Copy link
Copy Markdown

Triggered a retry attempt №1 out of 1.

@KotlinBuild
Copy link
Copy Markdown

Quality gate finished successfully (recovered via retry).

@KotlinBuild KotlinBuild merged commit 14a0618 into master Apr 21, 2026
1 check passed
@KotlinBuild KotlinBuild deleted the zardilior/fixing-deserialization-and-serialization-on-jklib-pipeline branch April 21, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants