This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-14
Channels
- # adventofcode (12)
- # aleph (8)
- # announcements (6)
- # babashka (16)
- # beginners (217)
- # biff (7)
- # calva (30)
- # chlorine-clover (4)
- # cider (3)
- # clj-kondo (15)
- # cljdoc (6)
- # clojure (50)
- # clojure-europe (86)
- # clojure-finland (2)
- # clojure-nl (1)
- # clojure-norway (37)
- # clojure-uk (2)
- # clojurescript (8)
- # cursive (10)
- # datomic (13)
- # emacs (1)
- # fulcro (41)
- # helix (1)
- # humbleui (2)
- # joyride (7)
- # juxt (4)
- # lsp (19)
- # off-topic (47)
- # pathom (14)
- # polylith (5)
- # portal (7)
- # reagent (10)
- # releases (4)
- # sci (1)
- # scittle (18)
- # shadow-cljs (54)
- # test-check (2)
- # tools-deps (28)
Back to classpath discussions again: I talked with Alex Miller about classpath stability and tools.deps.alpha and he confirmed that there is a very specific ordering used for the classpath that t.d.a produces and that it is reproducible across machines. The classpath produced by poly
when running tests is not reproducible across machines -- although my fork (mentioned above) fixes one aspect of that, namely ensuring the paths (src/test/resources) do at least come first, before the JAR and local dependencies. I have also confirmed that this lack of reproducible classpath order was the cause of the "incompatible class exception" I ran into (above) that persisted even with the external test runner -- because it's a classpath problem and the classpath poly test
produces depends on the hashes of those paths -- so having a different path to .m2
produces a different ordering, so poly test
is not deterministic across machines.
I'm going to dig into how poly test
builds the classpath, with a view to trying to leverage t.d.a more directly than it does today -- which I had advised very early on in the switch from lein
to deps.edn
(remember our discussions about that @tengstrand?) -- to try to get the classpath built by poly test
to at least be consistent across machines and, hopefully, get it to match what t.d.a. would produce, given the same set of deps.edn
files (tricky, since poly test
has to use a projection of the :test
alias across all the bricks to pick up test-specific paths and deps). This work will be independent of the external test runner work -- which I plan to clean up and get into a suitable state for a PR soon.
I've created https://github.com/polyfy/polylith/issues/260 and https://github.com/polyfy/polylith/issues/261 to act as discussion points for both of these issues, and I plan to work on PRs for both. Feedback welcome.
A PR is up for #260: https://github.com/polyfy/polylith/pull/262 -- this is just the refactoring necessary to support an external test runner with the API suggested: the actual external test runner lives in https://github.com/seancorfield/polylith-external-test-runner and we are dogfooding this at work already!
I and @tengstrand are looking into this, and we’ll get back to you once we have absorbed it.
I pushed another commit to that PR just now -- I realized the docstring for the new protocol was over-specific about the subprocess but did not specify the additional runner options. No code changes, just docs.
A PR is up for #260: https://github.com/polyfy/polylith/pull/262 -- this is just the refactoring necessary to support an external test runner with the API suggested: the actual external test runner lives in https://github.com/seancorfield/polylith-external-test-runner and we are dogfooding this at work already!