Remove unused kotlin.*.random imports in native NanoIdUtils - #237
Merged
Conversation
Delete the three unused .random extension imports (kotlin.collections.random, kotlin.ranges.random, kotlin.text.random) from the native NanoIdUtils. The file only uses kotlin.random.Random; nothing calls a .random() extension. Fixes #235 Co-Authored-By: Claude Opus 4.8 <[email protected]>
monkopedia-reviewer
approved these changes
Jul 10, 2026
monkopedia-reviewer
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the full diff. The three removed imports (kotlin.collections.random, kotlin.ranges.random, kotlin.text.random) are dead -- the file exclusively uses kotlin.random.Random via Random.Default and random.nextBytes(); no .random() extension call appears anywhere in the file body. 0 additions, 3 deletions, no scope creep. All 5 CI checks passed (compiler-tests, jni-tests, jvm-tests, lint, native-tests). Approving and merging.
monkopedia-reviewer
pushed a commit
that referenced
this pull request
Jul 15, 2026
* Refresh external dependencies to latest stable Dep-freshness pass ahead of the 1.1.4 release. All bumps are to latest stable (no pre-release): Kotlin 2.4.0→2.4.10, coroutines 1.10.2→1.11.0, serialization 1.10.0→1.11.0, ktor 3.4.1→3.5.1, kotlinx-io 0.9.0→0.9.1, okio 3.12.0→3.17.0, atomicfu 0.31.0→0.33.0, slf4j 2.1.0-alpha1→2.0.18 (pre-release→stable), plus build-only plugin bumps (dokka, ktlint, buildconfig, vanniktech, plugin-publish, clikt, benchmark) and nanoid npm 5.1.6→5.1.16. apiCheck is BCV byte-identical across all published modules (jvm + klib), so no consumer source changes are required. nanoid was held at the 5.x line (6.0.0 raises the engine requirement to node >=22); AGP is left at 9.0.0-rc01 since it is unused dead catalog config (no com.android.* plugin is applied). Co-Authored-By: Claude Opus 4.8 <[email protected]> * Prepare 1.1.4 release (version bump + changelog) Bump version 1.1.3 → 1.1.4 and add the 1.1.4 changelog entry (code-health cleanups #237-241 + the dependency refresh). Also backfill the missing 1.1.1, 1.1.2, and 1.1.3 entries — those releases shipped without changelog updates. Co-Authored-By: Claude Opus 4.8 <[email protected]> * Fold in post-review tidy-ups: nanoid 6.0.0 + drop dead AGP scaffolding - Bump nanoid (npm) 5.1.16 -> 6.0.0. The nanoid() API is unchanged; v6 raises its advisory engine floor to node >=22 (a mainstream LTS). The wasmJs @file:JsModule binding now opts in to kotlin.js.ExperimentalWasmJsInterop, which Kotlin 2.4.10 requires there. - Remove never-applied Android/AGP plugin scaffolding: the com.android.application / com.android.library / kotlin.android / kotlin.kapt `apply false` declarations and their version-catalog entries, including the pre-release `agp` pin that had to resolve on every build for nothing. ksrpc has no Android targets. - Update the 1.1.4 changelog accordingly. apiCheck remains BCV byte-identical; js/wasm compile green. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Monkopedia <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes three unused
.randomextension imports from the nativeNanoIdUtils:kotlin.collections.random,kotlin.ranges.random, andkotlin.text.random.The file's only randomness comes from
kotlin.random.Random(Random.Default,random.nextBytes(...)); nothing in the file calls a.random()extension, sothe three imports are dead leftovers from the original Java-to-Kotlin port.
Fixes #235
Verification (
JAVA_HOME=java-21-openjdk):./gradlew :ksrpc-core:compileKotlinLinuxX64 :ksrpc-core:ktlintCheck— passed.