mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-223808 IJ-MR-181153 use relative path to reduce size of fingerprint-debug.txt (300 > 200)
GitOrigin-RevId: ddb0f7897a5f9258b5ee8632b49b2e9dd7a579bd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
12d9dfa841
commit
21df137fbf
@@ -348,17 +348,18 @@ private suspend fun computeIdeFingerprint(
|
||||
val hasher = Hashing.xxh3_64().hashStream()
|
||||
val debug = StringBuilder()
|
||||
|
||||
fun relativePath(path: Path): Path = when {
|
||||
path.startsWith(runDir) -> runDir.relativize(path)
|
||||
path.startsWith(homePath) -> homePath.relativize(path)
|
||||
else -> path
|
||||
}
|
||||
|
||||
val distributionFileEntries = platformDistributionEntriesDeferred.await().distributionEntries
|
||||
hasher.putInt(distributionFileEntries.size)
|
||||
debug.append(distributionFileEntries.size).append('\n')
|
||||
for (entry in distributionFileEntries) {
|
||||
hasher.putLong(entry.hash)
|
||||
|
||||
var path = entry.path
|
||||
if (path.startsWith(homePath)) {
|
||||
path = homePath.relativize(path)
|
||||
}
|
||||
debug.append(java.lang.Long.toUnsignedString(entry.hash, Character.MAX_RADIX)).append(" ").append(path).append('\n')
|
||||
debug.append(java.lang.Long.toUnsignedString(entry.hash, Character.MAX_RADIX)).append(" ").append(relativePath(entry.path)).append('\n')
|
||||
}
|
||||
|
||||
val pluginDistributionEntries = pluginDistributionEntriesDeferred.await().pluginEntries
|
||||
@@ -369,7 +370,7 @@ private suspend fun computeIdeFingerprint(
|
||||
debug.append('\n').append(plugin.layout.mainModule).append('\n')
|
||||
for (entry in plugin.distribution) {
|
||||
hasher.putLong(entry.hash)
|
||||
debug.append(" ").append(java.lang.Long.toUnsignedString(entry.hash, Character.MAX_RADIX)).append(" ").append(entry.path).append('\n')
|
||||
debug.append(" ").append(java.lang.Long.toUnsignedString(entry.hash, Character.MAX_RADIX)).append(" ").append(relativePath(entry.path)).append('\n')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user