lsp

Shantanu Kumar 2025-08-25T13:22:12.591339Z

I see a cyclic dependency reported (due to :require-macros) in a CLJC file for such ns declaration:

(ns foo.core.util
  (:require [clojure.string :as str])
  #?(:clj (:import [clojure.lang ExceptionInfo])
     :cljs (:require-macros [foo.core.util])))
The code runs fine, so it seems like a buggy flagging on clojure-lsp part. Am I missing something?

ericdallo 2025-08-25T13:24:36.078869Z

Yeah, there is a issue that @danilo.silva is taking a look regarding that

ericdallo 2025-08-25T13:24:59.155189Z

if it becomes to hard to fix it we may release a hotfix making it off by default

ericdallo 2025-08-25T13:25:17.168789Z

https://github.com/clojure-lsp/clojure-lsp/issues/2109

👍🏽 1
seancorfield 2025-08-25T13:33:17.668859Z

I've had to turn that linter off in every project so far, which is a shame because I'd love to detect real cyclic dependencies 🙂

teodorlu 2025-08-25T14:13:58.974569Z

We're also seeing false positives — mostly from require calls inside comment forms. We have a dev namespace with depends on everything, which we also use (interactively) from rich comments, triggering cyclic dependency warnings.

ericdallo 2025-08-25T14:14:36.837339Z

Ok, will make a releasing changing the default until we fix it

🙏 1
teodorlu 2025-08-25T14:18:58.101329Z

Thank you — https://github.com/clojure-lsp/clojure-lsp/issues/2107 is exactly what we're seeing. I agree with your points about :as-alias too.

ericdallo 2025-08-25T14:22:00.542029Z

Ok, release in progress, should be available in a hour

👍 1
👍🏻 1
👍🏽 1
ericdallo 2025-08-25T15:09:52.706869Z

Done

borkdude 2025-08-25T15:16:52.744149Z

@ericdallo with pretty new linters in clj-kondo I usually release them as off by default or level info. maybe I should tweak some of them to warning now they are more mature but then they are usually left like this ;)

ericdallo 2025-08-25T15:18:10.870049Z

yeah, I actually decided to go with it enabled since we tested on multiple repos at nubank, but it seems it was not enough hehe

ericdallo 2025-08-25T15:13:14.401479Z

clojure-lsp Released clojure-lsp 2025.08.25-14.21.46 disabling by default new cyclic-dependencies linter until corner cases are fixed

👍 1
👍🏻 1