1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-06 03:34:03 +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()
println(output)
if (knownPlugins != output) {
val newPlugins = (output - knownPlugins).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") }
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") }
error(
"""
Unregistered plugins:
${if (newPlugins.isNotEmpty()) newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No unregistered plugins"}
Removed plugins:
${if (removedPlugins.isNotEmpty()) removedPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No removed plugins"}
${newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" }}
""".trimIndent()
)
}