Add support for coroutines version verification in CheckVersionCompatibility task#1015
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThis pull request extends the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tools/idea-plugin/build.gradle.kts (1)
184-194: ⚡ Quick winStabilize
resolvedComponentsordering to avoid nondeterministic task inputs/output.Line 193 converts sets to unsorted lists, and insertion order depends on resolution traversal. Sorting keys/dependents keeps diagnostics and task snapshots deterministic.
♻️ Proposed fix
- resolvedComponents = checkConfig.map { config -> - val result = mutableMapOf<String, MutableSet<String>>() + resolvedComponents = checkConfig.map { config -> + val result = sortedMapOf<String, MutableSet<String>>() for (component in config.incoming.resolutionResult.allComponents) { val mv = component.moduleVersion ?: continue val coordinate = "${mv.group}:${mv.name}:${mv.version}" val dependents = result.getOrPut(coordinate) { mutableSetOf() } component.dependents.forEach { dep -> dep.from.moduleVersion?.let { dependents.add("${it.group}:${it.name}:${it.version}") } } } - result.mapValues { (_, deps) -> deps.toList() } + result.mapValues { (_, deps) -> deps.sorted() } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/idea-plugin/build.gradle.kts` around lines 184 - 194, The current aggregation builds result: MutableMap<String, MutableSet<String>> and returns result.mapValues { (_, deps) -> deps.toList() }, which yields nondeterministic ordering; change the return to produce a deterministically ordered map and lists by sorting keys and dependents: for each entry in result sort the dependents set into a List (e.g. deps.sorted()) and return a sorted map (e.g. result.toSortedMap().mapValues { (_, deps) -> deps.sorted() }) so both keys and dependency lists are stable; update references to result, coordinate and dependents accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tools/idea-plugin/build.gradle.kts`:
- Around line 184-194: The current aggregation builds result: MutableMap<String,
MutableSet<String>> and returns result.mapValues { (_, deps) -> deps.toList() },
which yields nondeterministic ordering; change the return to produce a
deterministically ordered map and lists by sorting keys and dependents: for each
entry in result sort the dependents set into a List (e.g. deps.sorted()) and
return a sorted map (e.g. result.toSortedMap().mapValues { (_, deps) ->
deps.sorted() }) so both keys and dependency lists are stable; update references
to result, coordinate and dependents accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f1f3307f-7b30-4142-a1bc-4b58334799af
📒 Files selected for processing (3)
build-logic/src/main/kotlin/io/github/composegears/valkyrie/task/CheckVersionCompatibility.ktgradle/libs.versions.tomltools/idea-plugin/build.gradle.kts
ae1872b to
04d03bb
Compare
📝 Changelog
If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs: