Closed roman-rudakov closed 2 months ago
Already fixed on master
https://www.michielborkent.nl https://www.eetvoorjeleven.nu
On Wed, 11 Sep 2024 at 12:03, Roma Rudakov @.***> wrote:
- I have read the Clojure etiquette https://clojure.org/community/etiquette and will respect it when communicating on this platform.
version
clj-kondo v2024.08.29
platform
MacOS, homebrew.
editor
Emacs 30
problem
Some functions from Clojure 1.12 are not supported:
- stream-seq!
- stream-into!
- stream-reduce!
- stream-transduce!
repro
(ns repro)
(stream-seq! (java.util.stream.Stream/of 1))
Output or clj-condo --lint repro.clj
repro.clj:3:2: error: Unresolved symbol: stream-seq! linting took 11ms, errors: 1, warnings: 0
— Reply to this email directly, view it on GitHub https://github.com/clj-kondo/clj-kondo/issues/2392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFSBSH5RITXV2BOM74XPTZWAIQFAVCNFSM6AAAAABOATC5L6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTSMRWGQ4DKOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Nice, thanks! Waiting for the next release then.
@roman-rudakov You can have this working right now by just using clojure 1.12 in your deps.edn and linting the dependencies like this:
clj-kondo --lint "$(clojure -Sdeps)" --dependencies
I already have clojure 1.12 in my deps.edn
and I run clj-kondo as clj-kondo --lint src test env
, where src
, test
and env
are just directories in my classpath.
If I run:
clj-kondo --lint "$(clojure -Sdeps)" --dependencies
with some syntax error in the sources, it doesn't report it at all.
According to the help -Sdeps
also expects an argument:
-Sdeps EDN Deps data to use as the last deps file to be merged
If I run clojure -Sdeps
in the project root, I'm getting an empty output.
Considering this I'm not really sure how to make clj-kondo using clojure 1.12 properly for my project.
clj-kondo --lint "$(clojure -Spath)" --dependencies
is what I meant.
Please follow the documentation here:
https://github.com/clj-kondo/clj-kondo?tab=readme-ov-file#project-setup
ah, yes, I tried it. I usually run the following to refresh the cache, it doesn't fix the problem for me:
clj-kondo --copy-configs --dependencies --lint "$(clojure -Spath)"
Looks like I had to manually remove .clj-kondo/.cache
before running this. Sorry. Now it works for me.
you shouldn't have had to remove the .cache, normally, so not sure what caused this
Not sure what's wrong, but I cannot make it work on CI and locally it's not really stable.
The minimal reproducible example:
mkdir bug
bug/deps.edn
:
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.12.0"}}}
bug/src/core.clj
(ns core)
(stream-seq! (java.util.stream.Stream/of 1))
4. `mkdir bug/.clj-kondo`
5. `cd bug`
6. Run:
clj-kondo --lint "$(clojure -Spath)" --dependencies --copy-configs
Output:
No configs copied. [clj-kondo] clojure-1.12.0.jar was already linted, skipping [clj-kondo] core.specs.alpha-0.4.74.jar was already linted, skipping [clj-kondo] spec.alpha-0.5.238.jar was already linted, skipping
7. Run:
clj-kondo --lint src
Output:
src/core.clj:3:2: error: Unresolved symbol: stream-seq! linting took 24ms, errors: 1, warnings: 0
OK, I'll try your repro.
This seems weird, since there is no cache, it can't already be linted:
[clj-kondo] clojure-1.12.0.jar was already linted, skipping
Michiel Borkent @.***> writes:
This seems weird, since there is no cache, it can't already be linted:
Yes, I also noticed it. That's why I decided to try fresh minimal project. I also tried to cleanup .clj-kondo/.cache and .cpcache/ which is created in the project root, but the output is still the same.
-- Best regards, Roman
I believe I have the solution but CI isn't co-operating.
version
clj-kondo v2024.08.29
platform
MacOS, homebrew.
editor
Emacs 30
problem
Some functions from Clojure 1.12 are not supported:
stream-seq!
stream-into!
stream-reduce!
stream-transduce!
repro
Output or
clj-condo --lint repro.clj