1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-19 20:34:04 +02:00

Change the logic for detecting new dependencies on IdeaVim plugin

This commit is contained in:
Alex Plate 2024-03-29 09:27:09 +02:00
parent 8c1103c461
commit bfcf706ca7
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F

View File

@ -49,17 +49,13 @@ suspend fun main() {
} }
val output = response.body<List<String>>().toSet() val output = response.body<List<String>>().toSet()
println(output) println(output)
if (knownPlugins != output) { val newPlugins = (output - knownPlugins).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
val newPlugins = (output - knownPlugins).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") } if (newPlugins.isNotEmpty()) {
val removedPlugins = (knownPlugins - output.toSet()).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") } // val removedPlugins = (knownPlugins - output.toSet()).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
error( error(
""" """
Unregistered plugins: Unregistered plugins:
${if (newPlugins.isNotEmpty()) newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No unregistered plugins"} ${newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" }}
Removed plugins:
${if (removedPlugins.isNotEmpty()) removedPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No removed plugins"}
""".trimIndent() """.trimIndent()
) )
} }