Skip to content

Instantly share code, notes, and snippets.

@rossabaker
Created September 1, 2011 05:55
Show Gist options
  • Save rossabaker/1185548 to your computer and use it in GitHub Desktop.
Save rossabaker/1185548 to your computer and use it in GitHub Desktop.
Scala crossbuild conventions

To fight against SBT Case Statement Hell™ and unstable builds, the following guidelines are recommended for all Scala libraries:

  • A project must not release with snapshot dependencies, either indirect or transitive. Only snapshots may depend on snapshots. Rationale: We need repeatable builds. Snapshots are not repeatable.

  • Any library publishing under SBT crossbuild conventions commits to a prompt release for each new Scala version. Rationale: Do unto downstream projects as you would have upstream projects do unto you.

  • The release may be a new version or a new crossbuild of a previously released version. Rationale: Whatever gets it out the door quickest. You can always release again off your development branch later.

  • A release may depend on different versions of the same library for different cross builds. Rationale: You can't control when a dependency drops support for a certain version of Scala. That's fine, as long as your project still runs against the last supported version.

  • A release must not depend on a cross build for another Scala version, even if the version is binary compatible. Rationale: dependency managers do not recognize two crossbuilds as being the same library, and transitive dependencies may well result in duplicate libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment