cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
580 stars 7 forks source link

Test diffs of 3 lines or more cause diff box to continuously expand in `1.13.4-eap7` #2928

Open guess-burger opened 2 months ago

guess-burger commented 2 months ago

I recently upgraded to 1.13.4-eap7 to make use of changes to test diff-ing. With the switch to inline diffs (rather than opening a new editor tab for the diff in1.13.3-2024.1), there is an issue when comparing results that take 3 lines and over. They cause the inline diff to continuously expand with empty space.

Using a simple test like

(ns cursive
  (:require [clojure.test :refer :all]))

(deftest diff-issue-example

  (testing "diff displays ok"
    (is (= :foo :bar)))

  (testing "this displays OK too"
    (is (= :foo {:name :bar
                 :multi-line true})))

  (testing "diff continuously expands"
    (is (= :foo {:name :bar
                 :multi-line true
                 :needs-3?   true})))

  (testing "not just last"
    (is (= :foo :bar))))

Viewing a small diff: image

Viewing a 3 line or more diff (notice how the failure marking for the final test is now very far down the page): image

cursive-ide commented 2 months ago

Which IntelliJ version and platform are you on? I just tried this using your examples and can't reproduce it. I see all the diff inlays as being even smaller than your small example.

guess-burger commented 2 months ago

Thanks for taking a look. Here's (hopefully) the relevant information from IntelliJ

IntelliJ IDEA 2024.1.4 (Ultimate Edition)
Build #IU-241.18034.62, built on June 20, 2024
Runtime version: 17.0.11+1-b1207.24 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.5

I'll see if I can get some non-Cursive related inlays to appear to see try to diagnose this a bit more.