Skip to content

[KT-84822] Replace minimal stdlib srcs for real src and remove -Xcompile-builtins-as-part-of-stdlib #5894

Merged
KotlinBuild merged 2 commits intomasterfrom
zardilior/fixing-jklib-stdlib-for-tests
May 1, 2026
Merged

[KT-84822] Replace minimal stdlib srcs for real src and remove -Xcompile-builtins-as-part-of-stdlib #5894
KotlinBuild merged 2 commits intomasterfrom
zardilior/fixing-jklib-stdlib-for-tests

Conversation

@zardilior
Copy link
Copy Markdown
Collaborator

@zardilior zardilior commented Apr 18, 2026

This PR unifies the Jklib and JVM minimal stdlib by replacing local stubs with production source files from the core stdlib and jvm-minimal-for-test.

Minimizes redundant, local stubs in favor of real production code or code from jvm-minimal-for-test

Summary of Deletions & Replacements

Component Action Source Replacement
Char.kt Deleted stubs Synced core expect/actual from stdlib.
Serializable.kt Deleted stub Synced expect from jvm-minimal and actual from stdlib.
Collections Deleted minimalCollections.kt Replaced with production Collections.kt interfaces.
EnumEntries.kt Deleted stub Removed redundant local file.
JVM Internals Deleted JavaStubs/TypeIntrinsics Delegated directly to core source files.

Additional Changes:

@kotlin-safe-merge
Copy link
Copy Markdown

kotlin-safe-merge Bot commented Apr 18, 2026

substrateStdlibCompilerDependencies(commonDependency("org.codehaus.woodstox:stax2-api"))
substrateStdlibCompilerDependencies(commonDependency("com.fasterxml:aalto-xml"))

// 2. Dependencies to COMPILE the minimal stdlib KLIB
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved from the second block of dependencies

isCanBeResolved = true
}

val klibCompileClasspath by configurations.creating {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved from below as dependencies will now stay in a single block

@zardilior zardilior changed the title [JKLIB][TEST] Unmute IR text tests by using real stdlib sources in jkib-for-test [KT-84822] Unmute IR text tests by using real stdlib sources in jkib-for-test Apr 18, 2026
@zardilior zardilior force-pushed the zardilior/fixing-jklib-stdlib-for-tests branch 3 times, most recently from f194d1a to 7124432 Compare April 28, 2026 23:36

val jvmSourceFiles = jvmFiles.map { it.absolutePath }
val commonSourceFiles = commonFiles.map { it.absolutePath }
val (commonSourceFiles, jvmSourceFiles) = allFiles
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Style improvement

"-opt-in=kotlin.contracts.ExperimentalContracts",
"-opt-in=kotlin.ExperimentalMultiplatform",
"-opt-in=kotlin.contracts.ExperimentalExtendedContracts",
"-Xcompile-builtins-as-part-of-stdlib",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This flag is no longer used see
https://youtrack.jetbrains.com/issue/KT-80839

@zardilior zardilior force-pushed the zardilior/fixing-jklib-stdlib-for-tests branch 2 times, most recently from d0f108a to 02a5975 Compare April 28, 2026 23:53
@zardilior zardilior changed the title [KT-84822] Unmute IR text tests by using real stdlib sources in jkib-for-test [KT-84822] Replace minimal stdlib srcs for real src and remove -Xcompile-builtins-as-part-of-stdlib Apr 28, 2026
.map { it.absolutePath }
.joinToString(File.pathSeparator)

val fullClasspath = klibCompileClasspath.asPath
Copy link
Copy Markdown
Collaborator Author

@zardilior zardilior Apr 28, 2026

Choose a reason for hiding this comment

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

Simplified with equivalent logic

@zardilior zardilior force-pushed the zardilior/fixing-jklib-stdlib-for-tests branch 2 times, most recently from 2768c3f to 72fd807 Compare April 29, 2026 02:08
@zardilior zardilior marked this pull request as ready for review April 29, 2026 02:11
@zardilior zardilior requested review from demiurg906 and jDramaix and removed request for demiurg906 and jDramaix April 29, 2026 02:11
@zardilior zardilior marked this pull request as draft April 29, 2026 02:12
@zardilior zardilior force-pushed the zardilior/fixing-jklib-stdlib-for-tests branch from 72fd807 to 19a9a0b Compare April 29, 2026 02:16
@zardilior zardilior marked this pull request as ready for review April 29, 2026 02:23
@zardilior zardilior requested a review from sellmair April 29, 2026 03:40
@zardilior zardilior force-pushed the zardilior/fixing-jklib-stdlib-for-tests branch 4 times, most recently from 87d64ea to d372e83 Compare April 29, 2026 05:59
@zardilior zardilior force-pushed the zardilior/fixing-jklib-stdlib-for-tests branch from d372e83 to 34a9509 Compare April 29, 2026 06:02
@demiurg906 demiurg906 requested review from CristianGM and removed request for sellmair April 29, 2026 08:29
Copy link
Copy Markdown
Contributor

@demiurg906 demiurg906 left a comment

Choose a reason for hiding this comment

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

/final

@zardilior
Copy link
Copy Markdown
Collaborator Author

/safe-merge

@KotlinBuild
Copy link
Copy Markdown

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

Quality gate was triggered with the following revisions:

kotlin
Branch: refs/merge/GITHUB-5894/safe-merge
Commit: dac33b5

@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 5f95569 into master May 1, 2026
1 check passed
@KotlinBuild KotlinBuild deleted the zardilior/fixing-jklib-stdlib-for-tests branch May 1, 2026 01:35
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.

5 participants