This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-22
Channels
- # announcements (8)
- # babashka (4)
- # beginners (164)
- # calva (17)
- # cider (30)
- # cljdoc (4)
- # cljs-dev (6)
- # clojure (103)
- # clojure-europe (63)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-portugal (1)
- # clojure-uk (3)
- # clojured (10)
- # clojuredesign-podcast (2)
- # clojurescript (16)
- # conjure (2)
- # core-async (9)
- # cursive (26)
- # datalevin (4)
- # datomic (156)
- # gratitude (1)
- # holy-lambda (8)
- # honeysql (9)
- # hoplon (6)
- # off-topic (55)
- # polylith (14)
- # portal (21)
- # reagent (5)
- # reitit (16)
- # releases (3)
- # shadow-cljs (87)
- # spacemacs (3)
- # tools-deps (25)
- # xtdb (9)
Is my understanding right that the portal VS-Code extension always starts a server, and puts the server’s address in .portal/vs-code.edn
?
I’m asking because I’d like to check if this file exists to decide which :launcher
to use (in user.clj
) as not everyone in my team uses VS-Code.
Correct :thumbsup: https://github.com/djblue/portal/blob/master/src/portal/extensions/vs_code.cljs#L88-L89
I went ahead and https://github.com/djblue/portal/commit/09db810db9c5fc4ce53f1a89573089ac598c526f the auto delete. I might add a {:launcher :auto}
to resolve this issue automatically :thinking_face:
Sounds good 😎
Neat. How does the clojure.test
output stuff work?
i.e., what has to happen in the backend/test runner for Portal to show that?
So the viewer has a spec that matches data that get's sent to clojure.test/report
:
[{:type :begin-test-ns, :ns examples.data}
{:type :begin-test-var,
:var #'examples.data/test-report}
{:type :pass, :expected (= 0 0), :actual (= 0 0), :message nil}
{:file "NO_SOURCE_FILE",
:type :fail,
:line 8,
:expected (= 0 (inc 0)),
:actual (not (= 0 1)),
:message nil}
{:type :end-test-var,
:var #'examples.data/test-report}
{:type :end-test-ns, :ns examples.data}]
I've been wrapping my evals with something like:
(with-redefs [clojure.test/report ...] ...code)
And then conditionally tapping if there is any test outputOK. And how scalable is that likely to be for a test run with many thousands of tests in it?
(and it probably won't play nice with any tooling that already overrides clojure.test/report
such as Paul Stadig's Humane Test Output?)
I might try to take it for a test run (haha -- see what I did there?) when I next restart my work REPL and it picks up the new Portal "RELEASE"
🙂

Also, I haven't tried this yet, but I think if you have a lot of tests, you could tap an atom that has test data appended to it over time
At some point I'll get around to releasing how I've instrumented portal into my REPL workflow 👌
Yeah, I really should do some more short videos... or perhaps live stream some OSS project work...