kotlin-tooling-immutable-collections-0-5-x-migration

Migrate Kotlin codebases to kotlinx.collections.immutable 0.5.x by renaming copy-returning methods.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/shirulot/codex-skill --skill kotlin-tooling-immutable-collections-0-5-x-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-tooling-immutable-collections-0-5-x-migration
Source: https://github.com/shirulot/codex-skill/tree/main/kotlin-tooling-immutable-collections-0-5-x-migration
Command: npx skills add https://github.com/shirulot/codex-skill --skill kotlin-tooling-immutable-collections-0-5-x-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the mechanical and error-prone process of renaming copy-returning methods in kotlinx.collections.immutable from the 0.3.x/0.4.x naming convention to the 0.5.x participial form required by KEEP-0459.

Core Features & Use Cases

  • Compiler-Driven Migration: Leverages existing deprecation warnings to identify and rename specific call sites safely.
  • Implementer Support: Provides guidance and patterns for migrating custom classes that implement persistent collection interfaces.
  • Use Case: Use this skill when upgrading a large Kotlin codebase to version 0.5.x or later to resolve build-breaking deprecation warnings and ensure binary compatibility.

Quick Start

Use the kotlin-tooling-immutable-collections-0-5-x-migration skill to guide the automated renaming of deprecated persistent collection methods in the current project.

Frequently Asked Questions about kotlin-tooling-immutable-collections-0-5-x-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Kotlin immutable collections to 0.5.x?

Migrate Kotlin immutable collections to 0.5.x by renaming copy-returning methods to their participial forms. This automated refactoring targets PersistentList, PersistentMap, and PersistentSet interfaces to resolve deprecation warnings.

What is KEEP-0459 in kotlinx.collections.immutable?

KEEP-0459 is the Kotlin evolution proposal that requires renaming copy-returning methods in kotlinx.collections.immutable from the 0.3.x/0.4.x naming convention to the 0.5.x participial form. It enforces binary compatibility across persistent collection interfaces.

Do I need a functional build environment to refactor persistent collections?

Yes, refactoring persistent collections requires a functional build environment. The migration leverages existing compiler deprecation warnings to accurately identify and safely rename specific call sites without destructive changes.

Can I migrate custom classes implementing PersistentCollection interfaces?

Yes, you can migrate custom classes implementing PersistentCollection interfaces. The migration provides specific guidance and refactoring patterns for updating custom implementers to align with the 0.5.x participial method naming convention.

Why does my Kotlin build fail after upgrading kotlinx.collections.immutable?

Your Kotlin build fails after upgrading kotlinx.collections.immutable because 0.5.x deprecates older copy-returning method names. You must rename these methods to their participial forms to restore compilation and ensure binary compatibility.

What's the best way to resolve deprecation warnings for PersistentList and PersistentMap?

The best way to resolve deprecation warnings for PersistentList and PersistentMap is compiler-driven migration, which leverages build output to accurately identify and rename deprecated call sites to their 0.5.x participial forms.