๐งต I've been encountering a really pernicious bug that has something to do with clojure.test assertions involving certain Java objects, which makes tests *appear to pass when they actually fail*
Thanks @mgardner2, I'll get this fixed for the next build.
thanks @cfleming. Is there any way to prevent this kind of false positive in general? IMO it shouldn't be possible for a crash to result in a failing test appearing to pass
but that might be an IntelliJ issue, idk
I'm not sure, it's definitely not ideal obviously. Once I've investigated I'll have a better idea, and will try to make it so that errors in the test pipeline surface as errors rather than passes, even if the error is internal to Cursive and not from the test itself.
reproducer:
foo/Foo.java:
package foo;
import java.util.function.Predicate;
public interface Foo {
Predicate BAR = s -> true;
}
mytest.clj:
(ns mytest
(:require [clojure.test :as t])
(:import (foo Foo)))
(t/deftest crash
(t/is (= {:k Foo/BAR} {:k nil})))this results in a Cursive crash 100% of the time, but the test then appears to pass. I've submitted a couple crash reports already, but wanted to raise visibility since the outcome is so deceptive
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type com.intellij.psi.PsiElement
at cursive.diff.DiffKt.formatMap(diff.kt:65)
at cursive.diff.DiffKt.toFormat(diff.kt:94)
at cursive.diff.DiffKt.toFormat$lambda$0(diff.kt:99)
...
Cursive 2026.1-261 IntelliJ IDEA 2026.1.1 although it's been happening since at least the previous release of both
> Cursive crash 100% of the time I'm interested in how this manifests
this is what you see when it crashes. Somewhat easy to miss, especially since it disappears about 10 seconds after any further interaction with the IDE
ah, thank you