This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-24
Channels
- # announcements (5)
- # aws (24)
- # babashka (41)
- # beginners (130)
- # bristol-clojurians (2)
- # calva (39)
- # chlorine-clover (64)
- # cider (30)
- # clojure (202)
- # clojure-belgium (1)
- # clojure-dev (99)
- # clojure-europe (5)
- # clojure-hungary (4)
- # clojure-italy (10)
- # clojure-losangeles (8)
- # clojure-nl (11)
- # clojure-norway (6)
- # clojure-spec (7)
- # clojure-uk (12)
- # clojurescript (52)
- # core-typed (26)
- # cursive (19)
- # data-science (19)
- # datomic (19)
- # duct (10)
- # emacs (17)
- # fulcro (22)
- # graalvm (11)
- # jobs (3)
- # kaocha (28)
- # leiningen (6)
- # lumo (2)
- # malli (10)
- # nrepl (2)
- # off-topic (23)
- # pathom (2)
- # pedestal (7)
- # re-frame (3)
- # reagent (30)
- # reitit (2)
- # remote-jobs (2)
- # shadow-cljs (77)
- # sql (10)
- # test-check (22)
- # tools-deps (37)
- # vscode (1)
- # yada (3)
and fully automated maven release script to clojars. I'm in heaven. README even bumps versions https://github.com/typedclojure/typedclojure/commits/master
regarding clj-kondo, i had also added datalog "type checking" to it, which was fairly straightforward: https://lambdaforge.io/2019/11/08/clj-kondo-datalog-support.html
there has been done a lot of work to plug it into all kinds of clojure tooling, which would be very valuable to have for core.typed as well, i think. one problem i had with core.typed was to get it to run in this linting mode, i tried a few times with eastwood.
i planned to collect some type system related information with @borkdude here, but have not yet found the time: https://github.com/borkdude/clj-kondo/wiki
@ambrosebs what is your opinion on linear types? rust seems to get a lot of attention at the moment and i see the value of automatically tracking external resources (not necessarily GC collected memory) with the type system
recent addition to clj-kondo: return type inference:
$ clj-kondo --lint - <<< '(defn foo [] :foo) (inc (foo))'
<stdin>:1:25: error: Expected: number, received: keyword.
linting took 9ms, errors: 1, warnings: 0
@borkdude nice! what's the idea behind determining the return type? do you do it in advance or wait until you know the type of args?
@ambrosebs clj-kondo will try to figure out the return type of a function while it's going through the AST. if that function is then used and the expected argument type does not match with what the function returns, clj-kondo will emit a warning
Are you planning to flow these types at all, or is that out of scope just now? e.g.
$ clj-kondo --lint - <<< '(defn foo [] :foo) (let [a (foo)] (inc a))'
linting took 10ms, errors: 0, warnings: 0
This is great btw; I had no idea kondo was doing this stuff yet… just upgraded!
That is supposed to work, but I'm not sure why it doesn't in this case. I'll make an issue for it.
@U06HHF230 Fixed it. Are you running linux or mac?
Anyway here is the mac binary: https://8777-176829714-gh.circle-artifacts.com/0/release/clj-kondo-2020.02.16-SNAPSHOT-macos-amd64.zip And here's the linux binary: https://8776-176829714-gh.circle-artifacts.com/0/release/clj-kondo-2020.02.16-SNAPSHOT-linux-amd64.zip
wow that was quick
can I brew upgrade?
hmm looks like I can’t
ahh no worries 🙂
Upgraded:
$ clj-kondo --lint - <<< '(defn foo [] :foo) (let [a (foo)] (inc a))'
<stdin>:1:40: error: Expected: number, received: keyword.
linting took 47ms, errors: 1, warnings: 0
:thumbsup:typedclojure 1.0.7 is out, just some more coordinate changes https://github.com/typedclojure/typedclojure/blob/master/UPGRADING.md#from-typedclojure-103-to-typedclojure-107