Fork me on GitHub
#polylith
<
2021-10-02
>
seancorfield00:10:10

We have a use case for the multi-implementation component approach at work! We have some legacy code that needs to run on Java 8 and we're using httpkit as an HTTP client everywhere but we'd rather use Java 11's built-in HttpClient because we'll get better telemetry from New Relic on that. So we're going to have an http-client interface/component with an implementation for each library. Then we can build all our pure-Clojure projects with the hato-based implementation (wrapping the Java client) and we can have our legacy apps depend on the httpkit-based implementation and our Clojure code (that is used in both sets of apps) will just work against the interface.

polylith 3
seancorfield20:10:20

@furkan3ayraktar @tengstrand If I start changing the Polylith build/deploy machinery over to build-clj/`tools.build` instead of depstar, how should I go about testing it? I haven't actually tried to "build" Polylith yet since I've always used it as either a :local/root dep (when developing changes for it) or as a :git/sha dep for general usage.

tengstrand03:10:42

Before I push something, I perform these steps: • Execute the ./build.sh script to see that I can build a working jar (that I also use locally). • Execute poly test :all which will run all the tests from the poly project. • Execute the https://github.com/polyfy/polylith/blob/master/scripts/create-example.sh script. What it does is described in the script itself, but in short it’s used to produce files that make my life easier and to verify that the compiled poly command works as expected. This step sometimes involves manual work, e.g. when the output from any command has changed. To deploy we perform these steps: • Update the code and documentation to use the latest release in a few places. • Update the sha in the Add other Polylith artifacts as a dependencysection to use the latest sha. • Once these changes are made to the master branch, we create a tag and push it to the master branch, e.g. v0.2.13-alpha. • Once the CircleCI finishes the deployment, it will be deployed to Clojars and GitHub automatically. • Finally we update the version of the https://github.com/polyfy/homebrew-polylith packages and push those changes. I think that was all. As you can se, there are a few manual steps involved today.

1