Fork me on GitHub
#polylith
<
2021-12-15
>
Chris Rosengren00:12:57

Ahh nevermind, it looks like having a hardcoded {:source-paths } stopped it scanning directories

👍 3
furkan3ayraktar09:12:36

Nice to hear! I never used eastwood before so I didn’t have an answer. It’s good that we have an answer now!

vemv17:01:08

Indeed :source-paths are inferred, and therefore best left unconfigured: https://github.com/jonase/eastwood/tree/a983a04045ac9e0c4540693eade5a2e47193fc3c#depsedn @U2BDZ9JG3 what would be a great place to document Eastwood+Poly setup? Can contribute words or a PR

furkan3ayraktar19:01:26

I guess the best is to add it to this page: https://app.gitbook.com/o/-LAhrWK-mSHRqiTNUTDP/s/-Mj2L4VeP3frziYOoQWC/architecture/development However, I’m not sure if you can suggest edits to that page right away. @U1G0HH87L Do you now if it’s possible to contribute gitbook?

tengstrand19:01:42

Yes, it’s possible.

dangercoder09:12:11

Questions regarding CI, just want to verify I have understood things correctly 🙂. https://polylith.gitbook.io/poly/workflow/continuous-integration Let's say I would have 3 projects:

["invoicer" "myproject1" "myproject2"]
when running the tool, myproject1 and invoicer has changed and needs to be built. When it comes to CI - when the build completes for each project I create a new tag per project? git tag invoicer-XXX git tag myproject1-XXX

dangercoder09:12:31

or I might just build it all in one go and use the release tag. Hmm. Going back to the hammock.

oly09:12:25

this is certainly an area I am interested in, currently migrating a project but its a single project at the moment but as soon as I start splitting knowing how to build and deploy individual projects using github actions will be on my radar, so will keep an eye on any replies anyone got an example github action by any chance ?

dangercoder09:12:10

@UU67HFS2X we are in the same boat. I am looking at setting up CI for a polylith repo with future multiple projects using github actions right now.

furkan3ayraktar09:12:06

You can do in both ways. Either you can have a single stable tag and only deploy changed projects since the last stable tag, or you can create a tag for each project and use it. Polylith repository uses the first approach, a single release tag, where we tag once but only deploy the changed projects. You can have a look at Polylith’s own https://github.com/polyfy/polylith/blob/master/build.clj to see how its done. I noticed the CI & Deployment documentation is a little bit out of date. I updated it and you can see the updated version https://github.com/polyfy/polylith/blob/ci-and-deployment-update/doc/ci-and-deployment.md. This documents explains the CircleCI configuration that we have in the Polylith repo.

oly11:12:02

Thanks for adding some extra information, be handy when I get to that point 🙂

Aviv Kotek14:12:08

I made a simple git workflow on clojure-polylith-realworld-example-app project, for some reason "clojure -A:poly test :project" doesn't run any test, while the "check" command seem to work, will look on it abit later, but https://github.com/akotek/clojure-polylith-realworld-example-app/blob/master/.github/workflows/pull_request.yml might help you out @UU67HFS2X Run clojure -A:poly test :project WARNING: Implicit use of clojure.main with options is deprecated, use -M Execution time: 0 seconds

seancorfield18:12:38

We run this command in CI:

clojure -M:poly test since:previous-build
But we run CI for our entire monorepo, not just for specific subprojects, and so after each successful build, we force update the previous-build tag. I was sort of following Polylith's lead there because we generally want all updated apps to be deployed together across our cluster.

polylith 1
seancorfield18:12:51

If we were building and deploying applications separately, we'd probably tag separately too and narrow the test to just that tag and just that project (although I have not attempted that).

oly16:12:09

Trying this in github actions for some reason returns [] locally it seems to work for some reason which prevents me putting in a conditional 😕

clojure -M:poly ws get:changes:changed-or-affected-projects

seancorfield17:12:12

@UU67HFS2X Since you're pulling fresh from GH, there will be no changed files: it will all look in sync with GH.

furkan3ayraktar17:12:08

Adding since:previous-release argument should give the changes since the tagged point in git.

oly21:12:34

okay thanks for the tip 🙂

👍 1
oly11:12:12

So something I am not sure about, I have created a project which fails with file not found, I believe this is because it con not find a resource in one of the components should the resources be available to a project ? as we don't add paths to a project deps.edn file ? or should adding the component in the deps: key solve this ? Scratch that silly mistake, had -M in the :main-opts key so it was building -M -M and causing the error, thanks duckie

duckie 3