This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-23
Channels
- # announcements (2)
- # architecture (83)
- # asami (2)
- # babashka (49)
- # bangalore-clj (2)
- # beginners (235)
- # braveandtrue (1)
- # calva (17)
- # clojure (109)
- # clojure-australia (5)
- # clojure-czech (5)
- # clojure-dev (24)
- # clojure-europe (17)
- # clojure-germany (2)
- # clojure-nl (3)
- # clojure-serbia (13)
- # clojure-spain (1)
- # clojure-spec (1)
- # clojure-uk (20)
- # clojurescript (3)
- # community-development (34)
- # conjure (10)
- # cursive (21)
- # data-science (1)
- # datahike (1)
- # datalog (1)
- # datomic (12)
- # etaoin (3)
- # events (2)
- # fulcro (13)
- # graphql (8)
- # heroku (2)
- # lsp (58)
- # malli (32)
- # membrane (24)
- # off-topic (63)
- # parinfer (2)
- # pathom (14)
- # portal (14)
- # re-frame (16)
- # reagent (50)
- # releases (1)
- # rum (1)
- # shadow-cljs (10)
- # sql (6)
- # startup-in-a-month (1)
- # timbre (2)
- # tools-deps (61)
- # xtdb (4)
is there an issue for namespace sorting that imports (not required) seems to include brackets in sorting? Ie, it will sort (import [zebra] apple)
as it seems to think [
comes before a
which might be true but not really in the spirit of the alphabet
Note that clj-kondo also has a linter for unsorted namespaces so whatever LSP does it should conform with the linter
to me [zebra class] should come after apple. ie, it should be alphabetical regardless of the bracket presence or not
or you risk getting an odd separation
(:import
a1
b1
z1
[a2 class]
[b2 class]
[z2 class])
this is not how emacs clojure-mode, etc works. imo the exact way of sorting shouldn't matter as long as its consistent with the rest of the ecosystem, else people would be fighting against each other with different tooling
I think this could be the desired behaviour for some people but not for everybody, if we implement a flag for that on clojure-lsp, we could sort but clj-kondo linter would still complain about not corrected sorted unless we add a flag there as well
(testing "sorts according to symbols not brackets"
(test-clean-ns {}
(code "(ns foo.bar"
" (:import"
" [zebra import1]"
" apple))"
"import1."
"apple.")
(code "(ns foo.bar"
" (:import"
" apple"
" [zebra import1]))"
"import1."
"apple.")))
in transform_test
haha i for sure want the warnings to go away as well. we use a sorter currently and i can't quite reliably use lsp sorting because of this behavior
We could make the linter less strict so it would accept both, but I would like to preserve the old way as else it would be breaking
Just to make clear, this gives a warning in clj-kondo:
(ns foo
(:require [foo]
a))
but this doesn't:
(ns foo
(:require a
[foo]))
(after sorting with clojure-sort-ns
in emacs)Note that you have to enable :linters {:unsorted-required-namespaces {:level :warning}}
@U11BV7MTK please open a issue so we can prioritize that fix
Made an issue for kondo here: https://github.com/clj-kondo/clj-kondo/issues/1230
oof, and there's disagreement about casing. its putting java.util.Locale
before java.util.concurrent.TimeoutException
because L
comes before c
😕
Can anybody tell me how to run the Clojure-LSP tests after cloning the repo? (Sorry, I'm not well versed with the deps.edn
way of doing things. I created a kaocha
executable script but to no avail.)
@kumarshantanu take a look in the Makefile
This is what I want to accomplish with the bb task runner: have an easy overview of what you can do in a project
I'm trying to understand how projects use Makefile, I think usually just for invoking common tasks

like "prevent this step if file produced is newer than this or that", I hardly see that anymore
yes, in my experience, there are projects with simple tasks like clojure-lsp, lsp-mode and projects with makefiles like emacs-ng
"advanced features" ... I always thought that THE thing that make did was to decide to do stuff based on comparing file timestamps. Primarily, to recompile the .o file (and relink the lib or exe) if the .c file has been updated.
@UHL84CDTP That is was it was made for but I see it being used with almost all tasks "phony" in many projects, including clojure-lsp
Maybe there are clojure projects who use make to skip compiling an uberjar if sources haven't changed?
Googled "make phony" and now I understand. Haven't used make regularly since the 90s 😆
Thanks! Didn't notice the Makefile
.