@jkrasnay lastest clojure-lsp release should not fix the parsing issue but should avoid the exception during the code actions retrieval 🙂
Cool I'll give it a try. Moving house this weekend though so I might not get to it for a bit.
@borkdude for some reason last clj-kondo release broke clojure-lsp tests
Oh I made an issue about LSP rename being broken WRT refers, perhaps it's related to this?
Could be
it seems to be related with refers without position, row, col etc
yikes :)
repro welcome
yes, I'm trying to understand how to repro
I did make an addition for standalone requires that now emit to the analysis data
They didn't before
hum. probably that's the issue
and clojure-lsp expect X analysis
X?
N*
a fixed number of analysis
ah
This fix was needed for deps-infer
To fix it with babashka scripts :)
Np, I'll fix the tests, I just searched on analysis docs and saw no changes
that's why I thought it could be a bug
I consider this a fix to the analysis data
It is part of the CHANGELOG
The issue on clojure-lsp seems that the new var-usage of the refer does not contain a end-range
I get this new analysis:
{
"filename": "/tmp/sample.clj",
"row": 2,
"col": 35,
"from": "foo",
"to": "clojure.test",
"name": "deftest",
"macro": true,
"varargs-min-arity": 1
}
from:
(ns foo
(:require [clojure.test :refer [deftest]]))
other analysis have the: name-end-row
and name-end-col
repro:
clj -Sdeps '{:deps {clj-kondo {:mvn/version "2021.02.28"}}}' -m clj-kondo.main --config '{:output {:analysis true :format :json}}' --lint /tmp/sample.clj |jq .
I see. I can have a look tomorrow, but if you will beat me to it with a PR, I'd he happy to accept it
Yeah, I can try to fix on kondo 🙂
The change was done in clj-kondo.impl.analyzer.namespace.
This was added to support linting unresolved vars in the :refer
part of the libspec
thanks for the start point 😉
:reviewplease: https://github.com/clj-kondo/clj-kondo/pull/1182
This PR makes me wonder: why do we need metadata on the name again?
Ah, I see I get it
Merged, thanks!