This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-08
Channels
- # announcements (40)
- # babashka (14)
- # babashka-sci-dev (7)
- # beginners (50)
- # calva (8)
- # cider (25)
- # clj-kondo (7)
- # cljdoc (8)
- # cljs-dev (14)
- # clojars (6)
- # clojure (56)
- # clojure-australia (1)
- # clojure-berlin (2)
- # clojure-dev (16)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (7)
- # clojurescript (100)
- # cursive (57)
- # data-science (9)
- # datomic (6)
- # emacs (11)
- # figwheel (2)
- # fulcro (14)
- # helix (2)
- # hyperfiddle (9)
- # introduce-yourself (1)
- # lsp (20)
- # malli (14)
- # meander (34)
- # minecraft (1)
- # missionary (8)
- # off-topic (37)
- # pedestal (4)
- # polylith (18)
- # portal (3)
- # re-frame (5)
- # ring (33)
- # shadow-cljs (32)
- # spacemacs (6)
- # vim (16)
this seems like an interesting thread regarding visualisations of apps / components . I know poly tool has some basic visualisation in terms of deps . does it have more? in architecture channel
I have answered in the https://clojurians.slack.com/archives/C0904S2QJ/p1662612069408659?thread_ts=1660470173.046389&cid=C0904S2QJ.
I have answered in the https://clojurians.slack.com/archives/C0904S2QJ/p1662612069408659?thread_ts=1660470173.046389&cid=C0904S2QJ.
So the way I'm using shadow-cljs
with polylith
is to not use projects/deliverableA/deps.edn
to define dependencies and instead use https://github.com/dmg46664/problems/blob/main/01_shad_parent_root/projects/deliverableB/shadow-cljs.edn (example proj) to define dependencies and source paths. This does mean that the the poly
tool is unaware of the project dependencies unless I duplicate them in an unused project deps.edn
. The current constraints are:
1) The poly tool is unaware of shadow-clj.edn
so is unable to reason about dependencies unless information is duplicated.
2) shadow-cljs
is unable to be run from a parent directory like clj
is able to and it hard codes the location of shadow-cljs.edn
2.1) --config-merge
doesn't work delegating to a lower directory as it can only merge into a known build and you cannot add a build. (perhaps if there is a root shadow-cljs.edn
with all the project builds, but specifics are delegated down, this could work??)
2.2) shadow-cljs
cannot reference aliases in a parent dir deps.edn
3) :local/root
dependencies work with shadow delegating to deps but only for loading src
not loading shared test
code.
4) deps.edn
has deprecated referencing outside project directories "../xxx" and so poly
can only work either by symlinks or a root deps.edn
.
In order to allow everything to work together either poly
must be aware of shadow-cljs
or shadow-cljs
needs to work more like clj
.
It would be nice to run something like yarn shadow-cljs -A:parent-alias --parent-deps "../" compile script
or from a root directory run clj -A:shadow-cljs:deliverableB watch script
. However in the mean time I'm happy duplicating shadow-cljs.edn
and deps.edn
for my actual project. Thought I'd just document my experience. cc: @thheller
My question is 2.1 is not appropriate, because it would still force all projects
to share all dependencies. I had just thought of that approach while writing this up 😅
> deps.edn has deprecated referencing outside project directories "../xxx" and so polycan only work either by symlinks or a root deps.edn.
I really don't know enough about polylith to comment much. you can just use clj
to run shadow-cljs, there is no need to use the shadow-cljs
command if it doesn't do what you need it to do
Thanks for your responses! I need to make sure of a few things before responding. 🙏
I'm trying to run polylith Validate Workflow from https://github.com/polyfy/polylith/blob/master/doc/ci-and-deployment.md#1-validate-workflow in Jenkins CI using parallel stages so they run faster since JVM startup takes some time. https://www.jenkins.io/doc/book/pipeline/syntax/#parallel It failes and I get this error:
+ clojure -Sdeps {:mvn/local-repo "/var/jenkins_home/workspace/REDACTED_jenkins/.m2"} -M:poly deps color-mode:none
Error building classpath. Manifest type not detected when finding deps for polyfy/polylith in coordinate {:git/url "", :deps/root "projects/poly", :git/sha "22fe6fe46bbee5c678d7d81bcbbd46d83be98a75", :git/tag "v0.2.15-alpha"}
I presume there is a concurency issue here but not exactly sure where.
I might be able to spin some more agents so the poly checks run independently.
But wanted to ask here and see if someone else has had this issue. ( Did not find on this channel any mentions)sounds like you are describing clj with the same set of deps at the same time in parallel, which will break
you might be ok if you set GITLIBS in the environment to something parallel to your m2 setting (assuming a separate m2 for each stage)