Idempotency errors under 2020.1

Answered
Since updating my plugin to 2020.1, I've been receiving errors like this:
 
     [java] Caused by: java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
     [java]   0 != 1
     [java]   which is length of [] and [cursive.psi.resolve.ClojureResolveResultImpl@772d6d24]
     [java]
     [java] Recomputation gives [Lcursive.psi.resolve.ClojureResolveResult;@5241dc42 (class [Lcursive.psi.resolve.ClojureResolveResult;) which is equivalent to 'fresh'
     [java] Recomputation log:
     [java]   Resolving cursive.psi.impl.symbols.SymbolReference@eb426928 of class cursive.psi.impl.symbols.SymbolReference
     [java] ... 154 more
 
The error message mentions different threads, this would be possible in my plugin because my resolve process uses thread-local variables. Is this not permitted? If not, is there another way I could pass some external context into the resolve process?

Please sign in to leave a comment.