This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-03
Channels
- # aleph (1)
- # announcements (9)
- # babashka (3)
- # beginners (200)
- # calva (22)
- # cider (74)
- # clojure (97)
- # clojure-dev (43)
- # clojure-europe (15)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-sanfrancisco (2)
- # clojure-uk (103)
- # clojuredesign-podcast (2)
- # clojurescript (45)
- # core-async (5)
- # cursive (13)
- # datomic (42)
- # emacs (20)
- # fulcro (6)
- # graalvm (37)
- # jackdaw (10)
- # leiningen (7)
- # mid-cities-meetup (3)
- # off-topic (2)
- # pathom (1)
- # pedestal (3)
- # re-frame (6)
- # reagent (38)
- # reitit (5)
- # shadow-cljs (117)
- # spacemacs (1)
- # sql (1)
- # tools-deps (17)
- # vim (14)
- # xtdb (18)
It's the rainbow parens. So that map (red) is inside the run-jetty
function call (blue), which is inside the defonce
(white). Does that make sense?
Wonderful! I was just about to suggest that. Here are two pointers: https://github.com/BetterThanTomorrow/calva/blob/dev/src/cursor-doc/clojure-lexer.ts#L78 and https://github.com/BetterThanTomorrow/calva/blob/dev/src/extension-test/unit/cursor-doc/clojure-lexer-test.ts
In the tests these tokens are named symbol
s, unfortunately ... Anyway the symbol()
property explicitly does not allow them to be started with #
now, which will need to be revisited: https://github.com/BetterThanTomorrow/calva/blob/dev/src/extension-test/unit/cursor-doc/clojure-lexer-test.ts#L24
And if fast-check is new to you, you might want to check that out: https://github.com/dubzzz/fast-check (I'm far from an expert here, had never heard of property based testing until a few days ago. 😄 )
@pez i've recently been using the generators in test.check to test tree-sitter grammars. they and test.check have been great -- there are some conj talks by reid draper and gary fredericks if you are interested in the topic and haven't seen those already.
@sogaiu Cool. Can you point @hindol.adhya and me to where you generate stuff? Calva needs to be very lax in what it regards as a symbol, but it would help looking at how you have thought about it.
i use things like: https://github.com/clojure/test.check/blob/master/src/main/clojure/clojure/test/check/generators.cljc#L1702_L1705
i recommend watching gary fredericks' talk though if you haven't as it's a nice intro.
i started without using quick-check (so just the generators) to get a feel for things. the shrinking that quick-check can do is great as it typically can give a smaller sample that causes an error. that makes investigation so much easier.
@hindol.adhya In the Calva hacking docs, I think I've forgotten to mention that I recommend installing the Mocha Test Explorer Extension. Then run the tests from there. It's awesome.