This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-24
Channels
- # announcements (12)
- # aws (11)
- # babashka (1)
- # beginners (73)
- # cider (4)
- # clj-kondo (2)
- # cljsrn (4)
- # clojars (2)
- # clojure (68)
- # clojure-europe (8)
- # clojure-nl (5)
- # clojure-spec (6)
- # clojure-sweden (1)
- # clojure-uk (29)
- # clojurescript (41)
- # conjure (22)
- # datomic (33)
- # docker (58)
- # duct (3)
- # emacs (8)
- # events (1)
- # expound (3)
- # figwheel-main (5)
- # fulcro (33)
- # graphql (2)
- # kaocha (2)
- # lambdaisland (39)
- # leiningen (1)
- # nrepl (49)
- # nyc (1)
- # off-topic (77)
- # pathom (1)
- # re-frame (33)
- # reagent (28)
- # reitit (1)
- # rewrite-clj (2)
- # shadow-cljs (195)
- # spacemacs (1)
- # sql (60)
- # tools-deps (13)
- # vim (18)
- # xtdb (46)
@kenny integrating with kaocha is the long term goal, yes, mainly because that way you'll get a command line interface. There's no ready made solution for that yet.
Got it. So the way you'd use Chui would be to run it while working on your cljs and to use shadow-cljs to run the tests on the CI? The primary advantage it gives you is a UI for viewing your cljs tests?
With what is currently there, yes. Chui-ui is meant for interactive use in combination with shadow's reloading. There are several pieces to Chui, and only Chui-ui is tied to the browser. Chui is designed to form the base line for clojurescript test running, including from the CLI and on CI, but that is still WIP.
I see. When I read "test runner" I thought that meant something invoked on the command line.
it means something that runs your tests. There's the test library/framework that allows you to write your tests, and there's the test runner which finds the tests and runs them (possibly filtered, specific reporting, etc.)
Sure. I suppose that a runner that can only run tests via UI fits that definition haha. I've just always thought of the "base" form of a runner as the ability to run tests via cli. UIs are nice-to-haves on top of the CLI. I now see the misunderstanding. Thanks for the clarification 🙂
yeah, basically. I have some code I've been copying from project to project. All you need is a websocket and transit. The websocket namespace I've largely lifted from Figwheel (on the clojurescript side). On Clojure I use Java-WebSocket.
Client https://github.com/lambdaisland/funnel-client/blob/main/src/lambdaisland/funnel_client.cljs and example use: https://github.com/lambdaisland/funnel-client/blob/main/src/lambdaisland/funnel_client/examples/reload.cljs
but you can have a look at https://github.com/lambdaisland/kaocha-cljs2/blob/master/src/kaocha/cljs2/funnel_client.clj for inspiration
I'll probably add a clj client to funnel-client by the end of the month, before I do my monthly open source update post 🙂
I'm going to use it to see if I can create an enhanced cljs dev experience for editors. It's always tricky trying to do things like interpret the types once you're back at the editor or JVM, so pushing that into cljs makes sense.
I'm playing around with glogi, trying to figure out how to make it log my params as a string rather than a map... is this not what :closure-defines {lambdaisland.glogi.console.colorize "false"}
should do?
can you elaborate @ramblurr what your log statement looks like and what you want that to look like in your logs?
(log/info "The current value is " 2)
;; prints: [my.ns] {"The current value is " 2, :line 10}
Whereas I'd like to not print structured logs, but just plain strings:
[my.ns] The current value is 2
no worries, so to elaborate, Glögi does structured logging, that's what it's designed for. Doing plaintext/printf style formatting is out of its scope
or you can still leverage some of the glögi helpers, like lambdaisland.glogi/set-levels
and glogi/logger
I use structured logging most places, however in this case I need something that needs to only be read by humans.. its more of a status log than a real log file
So looking at the formatting macro at https://github.com/lambdaisland/glogi/blob/master/src/lambdaisland/glogi.clj#L3-L12
I'm having some trouble outputing the evaled forms of the keyvals.. I replaced the ~(-> keyvals-map ...
bit with ~(str/join " " (map str ~keyvals))
but this outputs the un-evaled exprs 😮
FYI, the README states: > Licensed under the term of the Mozilla Public License 2.0, see LICENSE. but LICENSE contains the eclipse public license