Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Mark few JVM-compatibility declarations deprecated. #2029

Merged
merged 3 commits into from
Sep 11, 2018
Merged

Conversation

olonho
Copy link
Contributor

@olonho olonho commented Sep 10, 2018

No description provided.

@@ -11,12 +11,15 @@ package kotlin

@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
@Retention(AnnotationRetention.SOURCE)
@Deprecated("@Volatile is meaningless in Native", level = DeprecationLevel.WARNING)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw, we already have these annotations in common stdlib with @OptionalExpectation:
https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt#L113

This is supposed to make these declarations redundant: common code with such an annotation would be properly compiled with Native backend. And these declarations can only be required to compile Kotlin/JVM code (which has default kotlin.jvm.* import) with Kotlin/Native, which doesn't seem to be a case we'd like to support, in light of Kotlin Multiplatform.

Copy link
Member

Choose a reason for hiding this comment

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

If you don't pursue the full deprecation cycle, you can raise the deprecation level straight to ERROR for this annotation.

@ilya-g
Copy link
Member

ilya-g commented Sep 11, 2018

Consider unifying wording with the similar deprecations in JS stdlib: JetBrains/kotlin@50f75ad

@olonho olonho merged commit 7d1713a into master Sep 11, 2018
@olonho olonho deleted the fix_compat branch September 11, 2018 11:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants