parallel cross building with VirtualAxis

This is part 2 of the post about sbt-projectmatrix, an experimental plugin that I've been working to improve the cross building in sbt. Here's part 1. I've just released 0.4.0.

  • sbt-projectmatrix enables parallel building of multiple Scala versions and JVM/JS/Native cross building.
  • VirtualAxis allows flexible inter-matrix dependencies between Scala-Java matrix, and custom cross-library axis.

Pamflet 0.8.2

in

Pamflet is a publishing application for short texts, particularly user documentation of open-source software.

Pamflet 0.8.2 updates its monospace typeface to SFMono, and undoes the incidental pink color that got introduced when I migrated from Blueprint to Bootstrap.

sbt 1.3.0

Released sbt 1.3.0.

semantics of dependency resolvers

in

The semantics of a dependency resolver determine the concrete classpath based on the user-specified dependency constraints. Typically the differences in the details manifest as different way the version conflicts are resolved.

  • Maven uses nearest-wins strategy, which could downgrade transitive dependencies
  • Ivy uses latest-wins strategy
  • Coursier generally uses latest-wins strategy, but it's tries to enforce version range strictly
  • Ivy's version range handling goes to the Internet, which makes the build non-repeatable
  • Coursier orders version string completely differently from Ivy

Expecty 0.12.0 and 0.13.0

in

sbt core concepts

in

I gave a talk at Scala Days 2019 at Lausanne in June.

parallel cross building using sbt-projectmatrix

in

Last year I wrote an experimental sbt plugin called sbt-projectmatrix to improve the cross building in sbt. I've just released 0.2.0.

building against multiple Scala versions

After adding sbt-projectmatrix to your build, here's how you can set up a matrix with two Scala versions.

ThisBuild / organization := "com.example"
ThisBuild / scalaVersion := "2.12.8"
ThisBuild / version      := "0.1.0-SNAPSHOT"
 
lazy val core = (projectMatrix in file("core"))
  .settings(
    name := "core"
  )
  .jvmPlatform(scalaVersions = Seq("2.12.8", "2.11.12"))

This will create subprojects coreJVM2_11 and coreJVM2_12.
Unlike ++ style stateful cross building, these will build in parallel.

splitting git repo

split a subdirectory into a new repo

git clone --no-hardlinks --branch master originalRepoURL childRepo
cd childRepo
git filter-branch --prune-empty --subdirectory-filter path/to/keep master
git remote remove origin
git prune
git gc --aggressive

Change originalRepoURL, master, and path/to/keep to appropriate values. Use -- --all to handle all branches.

move src back to path/to/keep

--subdirectory-filter moves the path of src/ etc under path/to/keep to root, so if you need to add a commit to move it back to the same (or another) path.

Syndicate content