Fork me on GitHub
#polylith
<
2021-05-20
>
tengstrand11:05:04

I’ve now added support for custom :tag-patterns in workspace.ednto the issue-66 branch so that changes can be tracked by project if needed (SHA=308eaed66a9f7ddb8592c09feade2856ae31cbc8).

seancorfield18:05:53

I’m not following how that allows tracking by project? Also, what’s the :test [] list in the :projects map? Is that where custom :tag-patterns elements might also go (alongside :alias and :test)?

tengstrand18:05:59

Hi Sean. The idea with`:test []` is that you can remove the test directories for some of your project (or only keep a set of them), e.g., if you think it’s enough to run the tests from one project (if you are quite sure that all tests are equivalent, regardless from which projects they are executed from) which saves execution time. The polylith repo uses that to only run the tests from the polyproject. If you have separate build pipelines for your projects in the Polylith monorepo, then you can have one entry in the :tag-patterns per project to keep track of changes per project, and tag projects individually, e.g. {:stable "stable-*", :release "release-*", :myproject "myproject-*"}.

seancorfield19:05:03

Can you give an example of what would go in :test [] if you wanted some specific test directory?

seancorfield19:05:04

And with the tags, where would :myproject be referenced elsewhere?

tengstrand21:05:21

Actually, you list the bricks in :test [] (but in the end, it’s about the test directories of these bricks). The you use since:myproject or since:previous-myproject when you run different commands.

seancorfield21:05:45

Ah, OK. Examples in the docs will help make that clearer then. Cool.

tengstrand05:05:14

I added it because we needed that functionality at work! When we have more experience around it, I will update the documentation.

3
tengstrand12:05:57

I created an https://github.com/cursive-ide/cursive/issues/2554 for Cursive to better support issue-66.

seancorfield18:05:53

I’m not following how that allows tracking by project? Also, what’s the :test [] list in the :projects map? Is that where custom :tag-patterns elements might also go (alongside :alias and :test)?

tengstrand18:05:59

Hi Sean. The idea with`:test []` is that you can remove the test directories for some of your project (or only keep a set of them), e.g., if you think it’s enough to run the tests from one project (if you are quite sure that all tests are equivalent, regardless from which projects they are executed from) which saves execution time. The polylith repo uses that to only run the tests from the polyproject. If you have separate build pipelines for your projects in the Polylith monorepo, then you can have one entry in the :tag-patterns per project to keep track of changes per project, and tag projects individually, e.g. {:stable "stable-*", :release "release-*", :myproject "myproject-*"}.