This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-08
Channels
- # adventofcode (49)
- # announcements (2)
- # architecture (4)
- # babashka (48)
- # babashka-sci-dev (4)
- # beginners (7)
- # biff (1)
- # calva (14)
- # cider (6)
- # clj-kondo (1)
- # clj-yaml (1)
- # cljsrn (3)
- # clojure (14)
- # clojure-art (12)
- # clojure-europe (62)
- # clojure-nl (1)
- # clojure-norway (35)
- # clojure-uk (5)
- # clojurescript (18)
- # clr (4)
- # community-development (9)
- # conjure (2)
- # core-async (3)
- # cursive (2)
- # datomic (2)
- # emacs (8)
- # events (3)
- # graalvm (1)
- # helix (6)
- # holy-lambda (3)
- # jobs (1)
- # off-topic (16)
- # polylith (30)
- # practicalli (11)
- # reitit (5)
- # shadow-cljs (14)
- # slack-help (10)
- # xtdb (6)
Several examples of Polylith saving us money -- and saving my butt during deployment windows that went wrong π
Reading this blog post truly made my day! Itβs so cool that the vision I had for Polylith, also works in practice! So thanks @U04V70XH6 for sharing this to the community!
And works at scale!
I should send you an updated ws.edn file. I'll try to remember next week when I'm back at work.
I totally agree with Joakim! It made my day :dancer:
Nice one!
I've got a small polylith workspace with 5 bricks, no bases, and just the dev project. I'd like to run the tests for all the bricks, but when I run poly test :all-bricks
it reports that there are no tests to run. There are definitely tests for those bricks, so I'm not sure what I'm doing wrong.
poly test :dev :all
will run all the tests, in the context of the development project.
Tests are always run in the context of a project -- either development
or one of the projects
.
By default, it runs only from the non-`development` projects, so if there are no projects
, it won't run any tests. That's why you need to specify :dev
to trigger development
project testing.
(your :dev
alias has dependencies on all five components
yes?)
poly test :dev :all
doesn't seem to find anything to run, so maybe not? I've got all the bricks' src and resources directories specified as :dev extra-paths in the workspace deps.edn, is there another way to depend on them?
Ah, you have paths not deps and :local/root
? Are you using Cursive?
I'm using emacs, but hopefully once this is working I can share it with coworkers who do use Cursive.
You may need :all-bricks
in addition to what I posted.
poly test :dev :all :all-bricks
should do it.
I'm sorry you have to use the paths approach, that's a pain π
The :local/root
deps approach saves you from duplicating all the bricks' library deps into the :dev
alias. That can get to be a real issue as your project grows. Pester the #C0744GXCJ folks about it π
I'm now subscribed to https://github.com/cursive-ide/cursive/issues/2554, it looks like there's a potential solution that just hasn't risen high enough on the priority queue yet
is there a way to know inside a CI (Jenkins) what polylith projects have changes ? I would like to run a CI job that runs a comon polylith job to check projects and run tests and then if all is OK, trigger jobs to build specific projects and docker images for them. I would like to do that only if projects had changes.
The last Sean article has an example of how to do that: https://corfield.org/blog/2022/12/07/deps-edn-monorepo-10/, I think it is in the end of the article.
I recommend using babashka for finding out which projects has changed and https://github.com/GoogleContainerTools/jib to build the images. Use that combo previously and it was great
@U05094X3J: I saw the changed-projects
fn and looks like it is what I was looking for.
Will try it out, thanks again