auto publish sbt plugin from GitHub Actions

in
name: Release
on:
  push:
    tags:
      - '*'
jobs:
  build:
    runs-on: ubuntu-latest
    env:
      # define Java options for both official sbt and sbt-extras
      JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
      JVM_OPTS:  -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Setup Scala
      uses: olafurpg/setup-scala@v10
      with:
        java-version: "adopt@1.8"
    - name: Coursier cache
      uses: coursier/cache-action@v5
    - name: Test
      run: |
        sbt test packagedArtifacts
    - name: Release
      env:
        BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
        BINTRAY_PASS: ${{ secrets.BINTRAY_PASS }}
        PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
        PGP_SECRET: ${{ secrets.PGP_SECRET }}
        CI_CLEAN: clean
        CI_RELEASE: publishSigned
        CI_SONATYPE_RELEASE: version
      run: |
        .github/decodekey.sh
        sbt ci-release

scopt 4

in

scopt 4.0.0 is cross published for the following build matrix:

Scala JVM JS (1.x) JS (0.6.x) Native (0.4.0-M2) Native (0.3.x)
3.0.0-M2 n/a n/a n/a
3.0.0-M1 n/a n/a n/a
2.13.x n/a n/a
2.12.x n/a n/a
2.11.x

Here's how functional DSL looks like in scopt 4:

import scopt.OParser
val builder = OParser.builder[Config]
val parser1 = {
  import builder._
  OParser.sequence(
    programName("scopt"),
    head("scopt", "4.x"),
    // option -f, --foo
    opt[Int]('f', "foo")
      .action((x, c) => c.copy(foo = x))
      .text("foo is an integer property"),
    // more options here...
  )
}
 
// OParser.parse returns Option[Config]
OParser.parse(parser1, args, Config()) match {
  case Some(config) =>
    // do something
  case _ =>
    // arguments are bad, error message will have been displayed
}

Instead of calling methods on OptionParser, the functional DSL first creates a builder based on your specific Config datatype, and calls opt[A](...) functions that returns OParser[A, Config].

These OParser[A, Config] parsers can be composed using OParser.sequence(...).

Weehawken-Lang1

talk: Scala 3: Python 3 or Easiest Upgrade Ever? by Daniel Spiewak

With the release of Scala 3 just around the corner and a large fraction of the library ecosystem now fully tested and releasing against that version, it's worth looking at the verdict on what this upgrade means for end users of Scala. In this talk, we will look at what has been surprisingly easy and what has been difficult in the process of migrating existing projects from Scala 2.13 to Scala 3.0, as well as sample a bit of what we can look forward to as industrial users of Scala once we make the (surprisingly short) leap.

talk: Equality in Scala by Eugene Yokota

I'll give a talk on equality in Scala. Through untangling this one seemingly simple yet complicated concept of ==, we will trace back the ancestral roots of Scala as a language, and how the design has evolved over the course of its history to achieve its ideals. This first talk is meant to be an ice-breaker to initiate conversations about different language design. The format for future meetings will be determined accordingly.

remote caching sbt builds with Bintray

in

For people who want to use remote caching now, I've created sbt-bintray-remote-cache, a spin-off of sbt-bintray.

To try put the following in project/plugins.sbt:

addSbtPlugin("org.foundweekends" % "sbt-bintray-remote-cache" % "0.6.1")

virtualizing a hackathon at ScalaMatsuri 2020

in

Here's a report of running a virtual hackathon at ScalaMatsuri Day 2 Unconference. Someone proposed it for the Unconference, and I volunteered to be a facilitator on the day, so I went in without preparation. I booked the time originally for 4h (noon - 4pm JST, 11pm - 3am EDT) but it was successful so it got extended after some coffee break.

One thing I emphasize is The Law of Two Feet:

If at any time you find yourself in any situation where you are neither learning nor contributing: use your two feet and go someplace else

Equality in Scala

in

I gave a talk at ScalaMatsuri on 'Equality in Scala'

sbt 1.4.0

in

Hi everyone. On behalf of the sbt project, I am happy to announce sbt 1.4.0. This is the fourth feature release of sbt 1.x, a binary compatible release focusing on new features. sbt 1.x is released under Semantic Versioning, and the plugins are expected to work throughout the 1.x series.

The headline features of sbt 1.4.0 are:

  • build server protocol (BSP) support
  • sbtn: a native thin client for sbt
  • build caching
  • ThisBuild / versionScheme to take the guessing out of eviction warning

How to upgrade

Download the official sbt launcher from SDKMAN or download from https://github.com/sbt/sbt/releases/tag/v1.4.0. This installer includes the sbtn binary.

In addition, the sbt version used for your build is upgraded by putting the following in project/build.properties:

sbt.version=1.4.0

This mechanism allows that sbt 1.4.0 is used only for the builds that you want.

metropolitan house supply (2020.09 mixtape)

in

we prove that #BlackLivesMatter by paving a way towards every Black and Indigenous man, woman, non-binary person be a home-owner — and not like the "project," but river-view condos with access to parks, commuting route, education, cafes, and Whole Foods that they are 51% white/asian.

Spotify: https://open.spotify.com/playlist/62RqkwMDQ6k8o88fjE7Oc2?si=8tT0-NnoRUK3...
YouTube: https://www.youtube.com/playlist?list=PLSUh6oJ5ZotVrO_XPe6q_yrfcpYFegLwG
4h 29m

parallel cross building sandwich

in
  • sbt-projectmatrix enables parallel building of multiple Scala versions and JVM/JS/Native cross building.
  • sbt-projectmatrix 0.6.0 simplifies the generated project ID.
  • sbt-projectmatrix 0.6.0 enables Scala 2.13-3.0 interoperability within a build.
Syndicate content