Fork me on GitHub

I am wondering if I am doing something wrong. After I make a change in the tests of a component, the test command is running the exact same tests twice. This is just because the component is being used in two projects. In both projects the relevant components used in the test are exactly the same though. Even though it is a simple test, it takes around a minute from the poly shell (startup time?). I’m thinking this could at least be halved by running the test only once. But this goes against the possibility that one of the projects uses a different implementation. I haven’t used this swap feature yet, but I’m paying the price for it. Is there a way to make this scenario more efficient?


I found a nice solution after reading the documentation one more time. I can filter for just the project I’m interesting in (at this time): poly test project:<project-name> and it will only run the tests for that brick from the perspective of that project. Perfect 🙂


From the documentation I read to keep our fast _brick_ tests fast enough to give us a really fast feedback loop ( What do you consider really fast? The test command is only fast for me when there are no changes, if some brick is affected, it takes at least half a minute. Enough to make me impatient unfortunately


I would say it’s a balance between how confident you want to be and how long you think is a reasonable time to run the tests.


Is the Poly project itself still a good example of how to organise the classpath with polylith? I see that deps are defined in the whereas I think the is saying that the deps should be defined in the components so that they are self-contained


You're conflating two different things > see that deps are defined in the some deps that happen to be useful during development > the deps should be defined in the components so that they are self-contained the deps that are used by the components the "main deps.edn" is the deps.edn of the Dev project that the documentation mentions: > Libraries are specified in deps.edn in each component, base, and project > Dev project src ./deps.edn > :aliases > :dev > :extra-deps There's nothing wrong with having some dependencies that are useful during development in the development deps.edn


I see your point. Adding some extra deps for development is ok. But I see that it’s not just about extra deps. There is redundancy between the component deps and the deps in the main deps.edn (e.g. zprint, me.raynes/fs, mvxcvi/puget)


I wonder if these “examples” need to be updated or if I just have some misunderstandings


Both @U2BDZ9JG3 and me use Cursive which doesn’t suport the :local/root syntax correctly. If you use Emacs/Cider or VSCode/Calva, then you don’t have to repeat libraries that are specified in bricks that are specified using the :local/root syntax in ./deps.edn.


Thank you, that helps!