Fork me on GitHub
#polylith
<
2024-01-30
>
seancorfield01:01:24

Given the public documentation of the Polylith core API (with api-version, projects-to-deploy, and workspace) for use in build.clj scripts etc, has any thought been given to making some of the poly commands available as functions in that API? check and test seem like good candidates (to me) -- especially since the test runner contract is also part of the public, documented API (although the actual create function is not -- hence the initial breakage of test runners in 0.2.19-SNAPSHOT!). Our build.clj was spawning a new poly process for changes, which I'm switching to projects-to-deploy, and we also spawn a new poly process to run changes from the build script... but it would be nice to be able to just invoke a test function directly (with an appropriate since: argument, at a minimum) -- especially given that we use an external test runner for classpath isolation/memory recovery.

๐Ÿ‘ 2
๐Ÿ’ฏ 1
seancorfield02:01:53

I know I can do this sort of thing (with the appropriate requires):

(let [args (user-input/extract-arguments
              (into ["test"] (:main-opts opts)))]
    (command/execute-command args))
But I'd prefer to use a public, stable, documented API for this...

tengstrand07:01:17

Yes, I think the time is right to add more functionality to that API. I can make sure we include check and test in 0.2.19 to start with. If someone out there feel we should add more, just comment here!

1
๐Ÿ‘ 1
๐Ÿ”ฅ 1
imre10:01:30

๐ŸŽ‰ 5