JetBrains / skiko

Kotlin Multiplatform bindings to Skia
Apache License 2.0
1.81k stars 111 forks source link

Resolve compilation warnings #706

Closed MatkovIvan closed 5 days ago

MatkovIvan commented 1 year ago

During compilation, Kotlin suggest to remove some properties that no longer needed

The property 'kotlin.mpp.enableGranularSourceSetsMetadata=true' has no effect in this and future Kotlin versions, as Hierarchical Structures support is now enabled by default. It is safe to remove the property.
The property 'kotlin.native.enableDependencyPropagation=false' has no effect in this and future Kotlin versions, as Kotlin/Native dependency commonization is now enabled by default. It is safe to remove the property.

And there are a few more places:

i: skiko/src/commonMain/kotlin/org/jetbrains/skia/ColorType.kt:316:9 With old Native GC, variable in singleton without @ThreadLocal can't be changed after initialization
w: skiko/src/commonMain/kotlin/org/jetbrains/skia/CubicResampler.kt:26:18 This declaration overrides deprecated member but not marked as deprecated itself. This deprecation won't be inherited in future releases. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
w: skiko/src/commonMain/kotlin/org/jetbrains/skia/FilterMipmap.kt:8:18 This declaration overrides deprecated member but not marked as deprecated itself. This deprecation won't be inherited in future releases. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
i: skiko/src/commonMain/kotlin/org/jetbrains/skia/GradientStyle.kt:52:9 With old Native GC, variable in singleton without @ThreadLocal can't be changed after initialization
w: skiko/src/commonMain/kotlin/org/jetbrains/skia/paragraph/Paragraph.kt:263:9 Unreachable code
i: skiko/src/commonMain/kotlin/org/jetbrains/skiko/Logging.kt:105:5 With old Native GC, variable in singleton without @ThreadLocal can't be changed after initialization
w: skiko/src/commonMain/kotlin/org/jetbrains/skiko/SkikoView.kt:32:18 This declaration overrides deprecated member but not marked as deprecated itself. This deprecation won't be inherited in future releases. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
w: skiko/src/commonMain/kotlin/org/jetbrains/skiko/SkikoView.kt:33:13 'onInputEvent(SkikoInputEvent): Unit' is deprecated. This method will be removed. Use override val input: SkikoInput
w: skiko/src/darwinMain/kotlin/org/jetbrains/skiko/Dispatchers.kt:42:26 This declaration needs opt-in. Its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi' or '@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)'
w: skiko/src/darwinMain/kotlin/org/jetbrains/skiko/Dispatchers.kt:73:12 Freezing API is deprecated since 1.7.20. See https://kotlinlang.org/docs/native-migration-guide.html for details
w: skiko/src/macosMain/kotlin/org/jetbrains/skiko/Convertors.macos.kt:130:16 Variable 'kind' initializer is redundant
w: skiko/src/macosMain/kotlin/org/jetbrains/skiko/Convertors.macos.kt:131:9 Variable 'key' is never used
w: skiko/src/macosMain/kotlin/org/jetbrains/skiko/SkiaLayer.macos.kt:203:28 'onInputEvent(SkikoInputEvent): Unit' is deprecated. This method will be removed. Use override val input: SkikoInput
w: skiko/src/macosMain/kotlin/org/jetbrains/skiko/SkiaLayer.macos.kt:220:13 'open' has no effect in a final class
w: skiko/src/macosMain/kotlin/org/jetbrains/skiko/SkiaLayer.macos.kt:220:36 Parameter 'arg' is never used
w: skiko/src/macosMain/kotlin/org/jetbrains/skiko/redrawer/MetalRedrawer.macos.kt:163:33 No cast needed
w: skiko/src/nativeJsMain/kotlin/org/jetbrains/skia/shaper/Shaper.nativejs.kt:29:41 No cast needed
w: skiko/src/nativeJsMain/kotlin/org/jetbrains/skia/shaper/Shaper.nativejs.kt:30:41 No cast needed
w: skiko/src/nativeJsMain/kotlin/org/jetbrains/skia/shaper/Shaper.nativejs.kt:31:43 No cast needed
w: skiko/src/nativeJsMain/kotlin/org/jetbrains/skia/shaper/Shaper.nativejs.kt:32:41 No cast needed
w: skiko/src/nativeJsMain/kotlin/org/jetbrains/skia/shaper/Shaper.nativejs.kt:37:56 No cast needed
w: skiko/src/nativeMain/kotlin/org/jetbrains/skia/impl/Managed.native.kt:32:54 Freezing API is deprecated since 1.7.20. See https://kotlinlang.org/docs/native-migration-guide.html for details
ld: warning: object file (skiko/dependencies/skia/m110-ad42464-1/Skia-m110-ad42464-1-macos-Release-x64/out/Release-macos-x64/libicu.a(libicu.icudtl_dat.o)) was built for newer macOS version (11.0) than being linked (10.13)
ld: warning: object file (skiko/dependencies/skia/m110-ad42464-1/Skia-m110-ad42464-1-macos-Release-x64/out/Release-macos-x64/libskunicode.a(libicu.icudtl_dat.o)) was built for newer macOS version (11.0) than being linked (10.13)
okushnikov commented 5 days ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.