Skip to content

2.2.0 compatibility guide #4877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 20, 2025
Merged

Conversation

daniCsorbaJB
Copy link
Contributor

@daniCsorbaJB daniCsorbaJB commented Jun 2, 2025

This update is to create the 2.2.0 compatibility guide.
Related ticket is here: KT-77014 [Docs] 2.2.0 Compatibility Guide

This update includes the first batch of language tickets to be included in the 2.2.0 compatibility guide
@daniCsorbaJB daniCsorbaJB requested a review from a team as a code owner June 2, 2025 14:15
@daniCsorbaJB daniCsorbaJB requested a review from Tapchicoma June 3, 2025 14:07
@sarahhaggarty sarahhaggarty force-pushed the 2-2-0-compatibility-guide branch from 792f86c to 0c102f9 Compare June 10, 2025 13:08
@sarahhaggarty sarahhaggarty self-requested a review June 10, 2025 13:15
@danil-pavlov danil-pavlov requested a review from Tapchicoma June 16, 2025 17:14
@danil-pavlov danil-pavlov changed the base branch from master to 2-2-0-doc-update June 18, 2025 15:16
Copy link
Collaborator

@sarahhaggarty sarahhaggarty left a comment

Choose a reason for hiding this comment

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

Huge effort @daniCsorbaJB ! Thanks for your hard work 🙏 Just a few things to check.

>
> **Incompatible change type**: source
>
> **Short summary**: Constructor calls and inheritance using type aliases that expand to types that use variance modifiers such as `out` are no longer allowed in K2.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
> **Short summary**: Constructor calls and inheritance using type aliases that expand to types that use variance modifiers such as `out` are no longer allowed in K2.
> **Short summary**: Constructor calls and inheritance using type aliases that expand to types that use variance modifiers such as `out` are no longer supported by the K2 compiler.

"In K2" seems vague so I tried to add additional explanation. It's OK to use in the header though.

>
> **Deprecation cycle**:
>
> - 2.2.0: `-jvm-default` compiler option is set to `enable` by default
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the -Xjvm-default- option deprecated at the same time? And is the -jvm-default` option documented in https://kotlinlang.org/docs/compiler-reference.html as part of another PR for Kotlin 2.2.0?

Copy link
Contributor Author

@daniCsorbaJB daniCsorbaJB Jun 20, 2025

Choose a reason for hiding this comment

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

Yes, it's deprecated at the same time
hmm 🤔 - it was introduced to the Gradle compiler options doc and not to the generic compiler-reference. Should it also be included there? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, it would be good to include it there too 👍

>
> **Incompatible change type**: source
>
> **Short summary**: `AbstractDoubleTimeSource` is deprecated; use `AbstractLongTimeSource` instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a standard library API reference link for the preferred source? https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.time/-abstract-long-time-source/

>
> **Incompatible change type**: source
>
> **Short summary**: `kotlin.native.Throws` is deprecated; use the common `kotlin.Throws` annotation instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a standard library API reference link for the preferred annoatation?
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throws/

>
> - 1.4.20: the plugin is deprecated
> - 2.1.20: a configuration error is introduced, and no plugin code is executed
> - 2.2.0: the plugin is removed
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> - 2.2.0: the plugin is removed
> - 2.2.0: the plugin code is removed

@daniCsorbaJB daniCsorbaJB merged commit c47cfc8 into 2-2-0-doc-update Jun 20, 2025
@daniCsorbaJB daniCsorbaJB deleted the 2-2-0-compatibility-guide branch June 20, 2025 10:55
AlejandraPedroza pushed a commit that referenced this pull request Jun 23, 2025
* feat: first language tickets for compatibility guide

This update includes the first batch of language tickets to be included in the 2.2.0 compatibility guide

* updating compatibility guide draft with language and stdlib tickets

* update: kotlin-android-extensions deprecation

* adding build tools features to the compatibility guide

* implementing build tools review comments

* implementing additional small comment

* Kotlin scripting update

* feat: multiplatform compatibility issues

* chore: header

* fix: review suggestions

Co-authored-by: Sarah Haggarty <[email protected]>

* fix: review suggestions

* implementing TWr review comments

---------

Co-authored-by: Danil.Pavlov <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>
AlejandraPedroza pushed a commit that referenced this pull request Jun 23, 2025
* feat: first language tickets for compatibility guide

This update includes the first batch of language tickets to be included in the 2.2.0 compatibility guide

* updating compatibility guide draft with language and stdlib tickets

* update: kotlin-android-extensions deprecation

* adding build tools features to the compatibility guide

* implementing build tools review comments

* implementing additional small comment

* Kotlin scripting update

* feat: multiplatform compatibility issues

* chore: header

* fix: review suggestions

Co-authored-by: Sarah Haggarty <[email protected]>

* fix: review suggestions

* implementing TWr review comments

---------

Co-authored-by: Danil.Pavlov <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>
AlejandraPedroza added a commit that referenced this pull request Jun 23, 2025
* update: update JVM target bytecode version 24

* update: updates for REPL in Kotlin 2.2.0

* Adding infromation to docs about JVM default method generation (#4867)

* feat: adding infromation to docs about JVM default method generation

* implementing review comments

* implementing review comments for java to kotlin interop

* implementing comments from TWr review

* update: adding information about new context-sensitive resolution  (#4865)

* update: adding information about new context-sensitive resolution to documentation

* implementing review comments

* implementing TWr review comments

* feat: stable non-local jumps (#4875)

* feat: add section for read write annotations kotlin metadata (#4870)

* feat: add note about experimental annotation support in Kotlin metadata

* adding new section to increase visibility in docs

* implementing comments from TWr review

* update: ant warning (#4882)

* update: new annotations defaulting rule and the new `all` meta-target (#4874)

* feat: new compiler warning management (#4876)

* feat: update JVM records for 2.2.0

* update: language updates for 2.2.0 release (#4873)

* update: language updates for 2.2.0 release

This PR contains doc updates about context parameters, guard conditions, and nested type aliases.

* Daniel review

* chore: fix typo

Co-authored-by: Dániel Csorba <[email protected]>

* add clarification about context receivers

* Removing paragraph about context receivers

---------

Co-authored-by: Dániel Csorba <[email protected]>

* feat: add @JvmExposeBoxed annotation for 2.2.0

* update: Windows support in Native (#4879)

* feat: add build tools API

* feat: add BCV for KGP

* chore: fix What's new version reference

* update: update the statuses of language features for Kotlin 2.2.0 (#4901)

* Update the statuses of language features for Kotlin 2.2
* fix: fix the status for Kotlin statics

---------

Co-authored-by: Andrey Polyakov <[email protected]>

* feat: add migration text from kotlinOptions{}

* feat: add 2.2.0 compatibility guide document (#4877)

* feat: first language tickets for compatibility guide

This update includes the first batch of language tickets to be included in the 2.2.0 compatibility guide

* updating compatibility guide draft with language and stdlib tickets

* update: kotlin-android-extensions deprecation

* adding build tools features to the compatibility guide

* implementing build tools review comments

* implementing additional small comment

* Kotlin scripting update

* feat: multiplatform compatibility issues

* chore: header

* fix: review suggestions

Co-authored-by: Sarah Haggarty <[email protected]>

* fix: review suggestions

* implementing TWr review comments

---------

Co-authored-by: Danil.Pavlov <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>

* feat: new features in memory manager (#4880)

* feat: Kotlin 2.2.0 release details and What's new (#4897)

* Kotlin 2.2.0 release details and What's new

* Adding What's new 2.2.0

* chore: resolve conflict in kr.tree

* chore: fix links

* Andrey review

* feat: legacy DCE deprecation (#4885)

---------

Co-authored-by: Sarah Haggarty <[email protected]>
Co-authored-by: Dániel Csorba <[email protected]>
Co-authored-by: Danil Pavlov <[email protected]>
Co-authored-by: Aleksey Zamulla <[email protected]>
Co-authored-by: Mikhail Zarechenskiy <[email protected]>
Co-authored-by: Andrey Polyakov <[email protected]>
Co-authored-by: Sarah Haggarty <[email protected]>
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.

7 participants