-
Notifications
You must be signed in to change notification settings - Fork 75
Candidates for removal deprecation #1473
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package org.jetbrains.kotlinx.dataframe.api | ||
|
||
import org.jetbrains.kotlinx.dataframe.DataFrame | ||
import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval | ||
import org.jetbrains.kotlinx.dataframe.util.MESSAGE_SHORTCUT_1_0 | ||
|
||
// region DataFrame | ||
|
||
@CandidateForRemoval | ||
@Deprecated(MESSAGE_SHORTCUT_1_0, ReplaceWith("columns().toDataFrame().cast()"), DeprecationLevel.ERROR) | ||
public fun <T> DataFrame<T>.copy(): DataFrame<T> = columns().toDataFrame().cast() | ||
|
||
// endregion |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ import org.jetbrains.kotlinx.dataframe.ColumnSelector | |
import org.jetbrains.kotlinx.dataframe.ColumnsSelector | ||
import org.jetbrains.kotlinx.dataframe.DataFrame | ||
import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload | ||
import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval | ||
import org.jetbrains.kotlinx.dataframe.annotations.Interpretable | ||
import org.jetbrains.kotlinx.dataframe.annotations.Refine | ||
import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup | ||
|
@@ -24,6 +23,7 @@ import org.jetbrains.kotlinx.dataframe.impl.api.moveImpl | |
import org.jetbrains.kotlinx.dataframe.impl.api.moveTo | ||
import org.jetbrains.kotlinx.dataframe.ncol | ||
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API | ||
import org.jetbrains.kotlinx.dataframe.util.MESSAGE_SHORTCUT_1_0 | ||
import org.jetbrains.kotlinx.dataframe.util.MOVE_TO_LEFT | ||
import org.jetbrains.kotlinx.dataframe.util.MOVE_TO_LEFT_REPLACE | ||
import org.jetbrains.kotlinx.dataframe.util.MOVE_TO_RIGHT | ||
|
@@ -409,7 +409,7 @@ public fun <T, C> MoveClause<T, C>.into( | |
/** | ||
* Move a single selected column to top level with a new name | ||
*/ | ||
@CandidateForRemoval | ||
@Deprecated(MESSAGE_SHORTCUT_1_0, ReplaceWith("into { pathOf(column) }"), DeprecationLevel.ERROR) | ||
@Refine | ||
@Interpretable("MoveInto0") | ||
public fun <T, C> MoveClause<T, C>.into(column: String): DataFrame<T> = pathOf(column).let { path -> into { path } } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you remember why we want to remove it? It's supported by compiler plugin, seems useful There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I really don't see a reason 😄 . Let's keep it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
or, you know There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but yes, let's keep it, as we treat column paths and the String API as the same thing :) |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,7 @@ class ConstructorsTests { | |
col.type() shouldBe typeOf<AnyRow>() | ||
col.kind() shouldBe ColumnKind.Group | ||
col[0] shouldBe row | ||
@Suppress("DEPRECATION_ERROR") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we deprecate them, we should probably remove any internal uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea! But we should put somewhere that we will make it internal maybe. Or should we have this deprecation suppression mechanism being seen as "we're planning not to remove it but to make it internal"? |
||
col[1].isEmpty() shouldBe true | ||
} | ||
|
||
|
@@ -103,7 +104,9 @@ class ConstructorsTests { | |
col.type() shouldBe typeOf<AnyRow>() | ||
col.kind() shouldBe ColumnKind.Group | ||
col[0] shouldBe row | ||
@Suppress("DEPRECATION_ERROR") | ||
col[1]!!.isEmpty() shouldBe true | ||
@Suppress("DEPRECATION_ERROR") | ||
col[2]!!.isEmpty() shouldBe true | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also usually put the replaceWith contents in the deprecations file. I'm impartial to it, as long as we have at least one constant String there to track the deprecations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like it, because it's hard to validate when it's remote, especially in singular cases + losing IDE code analysis.

And btw we have a lot of them in the project:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense :)