Fork me on GitHub
#polylith
<
2021-11-23
>
Thomas Moerman16:11:41

Q: about polylith and mount (using mount, considering adopting polylith): where do the defstate components live? Should they be defined in the interface namespaces?

furkan3ayraktar16:11:10

We define them in the implementation of the component and usually expose accessor functions from the interface. So as an example, if database component defines it’s state in the implementation with defstate, it does not expose the defstate but instead exposes a function to retrieve the database connection from the state in the interface.

Thomas Moerman16:11:03

Aha, that was what I was hoping, thanks. I was a bit confused because in test, using mount/only in a fixture, I seem to need the defstate vars, thus reaching into the impl namespaces. Perhaps i need to do some more tinkering to get it right.

furkan3ayraktar16:11:00

If you need, tests can access to implementation directly in Polylith, unlike sources.

Thomas Moerman18:11:17

Makes sense. :thumbsup:

shields18:11:03

Hey, @furkan3ayraktar hope all is well. I was wondering if you have been able to upgrade to the newest version of Datomic Cloud and push/deploy with polylith.

furkan3ayraktar19:11:50

Hi! All good hope the same! We are running on 936-9118 at the moment without any issues. The only tweak is, we have more than one Polylith projects that run as different Datomic Cloud query groups and reproducible deployments requires them to live in different git repositories. Since Polylith is a monorepo, we overcome that limitation by using the unreproducible deployments with their own unique names in the format of branch-commit_sha-project_name.

1