From 8063db5f80ceb1b50b7aa4a40639e14e0bd4f554 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Fri, 10 Aug 2018 16:34:33 +0700 Subject: [PATCH] Fix RemoteException that happens in JPS with compiler daemon Recently, the container for "lookups" has changed to THashSet And it lead to exception: java.io.InvalidClassException: gnu.trove.THashSet; local class incompatible: stream classdesc serialVersionUID = -8659895033752433145, local class serialVersionUID = -1699000958968314003 The reasons for different versions of THashSet are unknown (though likely related to a slightly different classpathes), but the fix is rather straight-forward #KT-26011 Fixed --- .../org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt index 987a5ee0ec6..8c3f244a131 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt @@ -53,7 +53,8 @@ class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, even if (isDoNothing || lookups.isEmpty()) return profiler.withMeasure(this) { - facade.lookupTracker_record(lookups) + // Converting to list is intentional because THashSet may lead to serialization-related problems + facade.lookupTracker_record(lookups.toList()) } lookups.clear()