sageserpent-open / kineticMerge

Merge a heavily refactored codebase and stay sane.
MIT License
10 stars 2 forks source link

How is Kinetic Merge packaged? #12

Closed sageserpent-open closed 1 year ago

sageserpent-open commented 1 year ago

The workflow tries to be as automatic as possible, and all interaction for resolving code motion divergences as per #6 uses a command line interaction - so presumably we just want a command that can be invoked from the shell.

Deliverable: a command kinetic_merge that uses some Scala or Java code to yield a successful status back to the shell.

sageserpent-open commented 1 year ago

The original plan was to build an uberjar with either sbt-assembly or sbt-proguard, but scala-cli seemed intriguing ... after a lot of faffing around, a project was set up with the core Scala sources being built by SBT, with a sibling scala-cli project that pulled in a published reference to the core artefact and produced a standalone executable.

That worked after a fashion, but the split wasn't really what I was after, and IntelliJ doesn't get on with the BSP definition generated by scala-cli. The build process also involved manual steps.

As it turns out, scala-cli delegates to Coursier to build a standalone executable, and it is is fairly straightforward to set up an SBT-only project that has a task that depends on publishLocal and then invokes Coursier to build the same kind of standalone executable from the locally published artefact.

So there is no longer any need to split the sources, and the build can be fully automated. Result.

sageserpent-open commented 1 year ago

Pushed out Git SHA: 7e86b699305d4a5d4f847bd0db87089bb7c652ab to complete this.