Skip to content

The cider-error-hoover overlay gets applied to random logging statements in the REPL #3539

@lassemaatta

Description

@lassemaatta

Expected behavior

Accidentally clicking on a line in the REPL should not open dired 😅

Actual behavior

The logging framework (com.taoensso/timbre) of our app logs stuff in the REPL. Sometimes, some subsegments of these log lines get the cider-error-hoover overlay. If you accidentally click on such line segment, a dired buffer opens in the project root folder.

Full line in the REPL:

DEBUG 2023-10-18 14:40:28.101 [962fe21b-a87d-4cfa-afc8-b64556de155d] [] [] lupapalvelu.perf-mon - /api/query/comments : 4 ms, 1 db calls took totally 2 ms

The section of the above line which acts as a link:

DEBUG 2023-10-18 14:40:28.101 [962fe21b-a87d-4cfa-afc8-b64556de155d] [] [] lupapalvelu.perf-mon - /api/query/comments : 4

In other words, the rest of the line ( ms, 1 db calls took totally 2 ms) does not get the overlay and does not act as a link.

The describe-text-properties on such a line segment produces.

Text content at position 67056:


There are 2 overlays here:
 From 67007 to 67128
  category             cider-error-hoover
  follow-link          mouse
  keymap               [Show]
  mouse-face           highlight
  pointer              hand
 From 67007 to 67162
  face                 hl-line
  priority             -50
  window               [Show]


There are text properties here:
  font-lock-face       cider-repl-stdout-face
  fontified            t
  help-echo            cider-locref-help-echo
  rear-nonsticky       (font-lock-face)

[back]

Steps to reproduce the problem

Hard to say. I think this might have something to do with the [] [] segment of the line. I think that this problem only affects lines which contain that part.

Environment & Version information

CIDER version information

;; CIDER 1.8.3-snapshot (package: 1.8.2), nREPL 1.1.0-alpha1
;; Clojure 1.10.3, Java 17.0.8.1

Lein / Clojure CLI version

Leiningen 2.10.0 on Java 17.0.8.1 OpenJDK 64-Bit Server VM

Emacs version

GNU Emacs 29.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-09-30

Operating system

Arch Linux

JDK distribution

openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1, mixed mode)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions