Fork me on GitHub
#core-typed
<
2022-09-29
>
Setzer2208:09:01

Hey! I'm trying out typed clojure (and in particular the new malli support), but I must be having some misconceptions about how typed clojure works, because I can't seem to get any typed errors. What I did was: • Download the main repository • Launch an nrepl session for the project in typedclojure/examples/malli-type-providers using clj -A:dev -A:nREPL • Connect to the running repl with CIDER (using cider-connect) • Navigate to the namespace typed-example.malli-type-providers. Confirm the example works fine and there are no type errors. • (here's where the problems start) • Try to introduce a trivial change like calling (foo "a"), save file, type checking doesn't work (no type errors) • Try to introduce a (defn test [] (foo "hello")), re-evaluate the same buffer, re-run type checks (still no type errors) So I guess my question is: What do I need to do for typed clojure to see my changes? Is there some sort of caching going on?

ambrosebs14:09:35

@UP0Q30S10 oh dear, there was another file test/typed_example/malli_type_providers.clj that was shadowing src/typed_example/malli_type_providers.clj!

ambrosebs14:09:42

just pushed a fix, please try again.

Setzer2216:09:06

Ah! Glad to know I wasn't crazy 😄

Setzer2216:09:13

It works 🎉

🎉 1
Setzer2209:09:04

Doesn't seem to have anything to do with the malli integration. Just in case, I tried to add a normal annotation with (t/ann foo [Number -> Number]) and that didn't change anything