Skip to content

Commit 1faf7c6

Browse files
cols deprecation fix
1 parent 82ad34e commit 1faf7c6

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/cols.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import org.jetbrains.kotlinx.dataframe.impl.headPlusArray
2424
import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL
2525
import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL_COLS
2626
import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL_COLS_REPLACE
27+
import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL_REPLACE
2728
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
2829
import kotlin.reflect.KProperty
2930

@@ -250,7 +251,7 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
250251
public fun <C> ColumnSet<C>.cols(predicate: ColumnFilter<C>): ColumnSet<C> =
251252
colsInternal(predicate as ColumnFilter<*>).cast()
252253

253-
@Deprecated(COLS_TO_ALL, ReplaceWith(COLS_TO_ALL_COLS_REPLACE), DeprecationLevel.ERROR)
254+
@Deprecated(COLS_TO_ALL, ReplaceWith(COLS_TO_ALL_REPLACE), DeprecationLevel.ERROR)
254255
public fun <C> ColumnSet<C>.cols(): ColumnSet<C> = cols { true }
255256

256257
/** @include [ColumnSetColsPredicateDocs] */
@@ -278,7 +279,7 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
278279
public fun ColumnsSelectionDsl<*>.cols(predicate: ColumnFilter<*>): ColumnSet<*> =
279280
this.asSingleColumn().colsInternal(predicate)
280281

281-
@Deprecated(COLS_TO_ALL, ReplaceWith(COLS_TO_ALL_COLS_REPLACE), DeprecationLevel.ERROR)
282+
@Deprecated(COLS_TO_ALL, ReplaceWith(COLS_TO_ALL_REPLACE), DeprecationLevel.ERROR)
282283
public fun ColumnsSelectionDsl<*>.cols(): ColumnSet<*> = cols { true }
283284

284285
/** @include [ColumnsSelectionDslColsPredicateDocs] */

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ internal const val FORMATTING_DSL_REPLACE = "FormattingDsl"
119119
internal const val RGB_COLOR = "Replaced by `RgbColor`. $MESSAGE_1_0"
120120
internal const val RGB_COLOR_REPLACE = "RgbColor"
121121

122+
internal const val COLS_TO_ALL = "This `cols()` overload will be removed in favor of `all()`. $MESSAGE_1_0"
123+
internal const val COLS_TO_ALL_REPLACE = "this.all()"
124+
125+
internal const val COLS_TO_ALL_COLS = "This `cols()` overload will be removed in favor of `allCols()`. $MESSAGE_1_0"
126+
internal const val COLS_TO_ALL_COLS_REPLACE = "this.allCols()"
127+
122128
// endregion
123129

124130
// region WARNING in 1.0, ERROR in 1.1
@@ -213,10 +219,4 @@ internal const val ALL_COLS_EXCEPT_REPLACE = "this.allColsExcept { other }"
213219
internal const val ALL_COLS_EXCEPT_REPLACE_VARARG = "this.allColsExcept { others.toColumnSet() }"
214220
internal const val EXCEPT_REPLACE = "this.except { other }"
215221
internal const val EXCEPT_REPLACE_VARARG = "this.except { others.toColumnSet() }"
216-
217-
internal const val COLS_TO_ALL = "This `cols()` overload will be removed in favor of `all()`. $MESSAGE_1_0"
218-
internal const val COLS_TO_ALL_REPLACE = "this.all()"
219-
220-
internal const val COLS_TO_ALL_COLS = "This `cols()` overload will be removed in favor of `allCols()`. $MESSAGE_1_0"
221-
internal const val COLS_TO_ALL_COLS_REPLACE = "this.allCols()"
222222
// endregion

0 commit comments

Comments
 (0)