requiem for effective engineering (2022.12 mixtape)
- Spotify: https://open.spotify.com/playlist/1Rrhziva29xypzeZM80SKc?si=14d809146ae448d0
- YouTube: https://www.youtube.com/playlist?list=PLSUh6oJ5ZotXfSaWywi-bZqNKAsfApbX1
4h9m
2 years at Twitter
I was a Staff Engineer at Twitter’s Build/Bazel Migration team. After two incredible years, November 17 was my last day (I took the voluntary separation offer and resigned, not that it matters). Twitter has been a special place to work for, for its culture of excellence, diversity, and outpouring of care for all the people that made Flock the Flock. I am grateful that I got the opportunity to experience that firsthand, and be part of it.
Here’s a quick retrospective on my last two years. Info available here are based on publicly available talks and data. Just from our team 10+ members left Twitter after the buyout, so I’ve sprinkled this post with links to their LinkedIn profiles both current and former.
sbt 1.8.0
Hi everyone. On behalf of the sbt project, I am happy to announce sbt 1.8.0. This is the eighth 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. Please try it out, and report any issues you might come across.
Highlights
- Updates Coursier to 2.1.0-RC1 to address CVE-2022-37866
- Updates Ivy fork to 2.3.0-sbt-a8f9eb5bf09d0539ea3658a2c2d4e09755b5133e to address CVE-2022-37866
- Updates scala-xml to 2.x
sbt 1.8.0-RC1
Hi everyone. On behalf of the sbt project, I am happy to announce sbt 1.8.0-RC1. This is the eighth 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. Please try it out, and report any issues you might come across.
Highlights
sbt 1.8.0 is a small release focused on upgrading scala-xml to 2.x. In theory this breaks the binary compatibility in the plugin ecosystem, but in practice there’s already a mixture of both 1.x and 2.x.
If you encounter a conflict in plugins, try putting the following in project/plugins.sbt
:
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
sbt 1.7.3
I’m happy to announce sbt 1.7.3 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.7.3
See 1.7.0 release note for the details on 1.7.x features.
Highlights
- Updates underlying Coursier from 2.1.0-M2 to 2.1.0-M7-18-g67daad6a9 (lm-coursier-shaded 2.0.12) by @eed3si9n
sbt 1.7.2
I’m happy to announce sbt 1.7.2 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.7.2
See 1.7.0 release note for the details on 1.7.x features.
Highlights
- Fixes invalidation of incremental
testQuick
task #6903 by @gontard - Updates
sbt new
by default to use Giter8 0.15.0 - Updates launcher to support Scala 3 apps #7035 by @eed3si9n
- Adds
diagnosticCode
anddiagnosticRelatedInforamation
(sic) toInterfaceUtil.problem(...)
#7006 by @ckipp01 - Forwards
diagnosticCode
to BSP #6998 by @ckipp01
2022.09 mixtape
- Spotify: https://open.spotify.com/playlist/0C5LhI2qb9bh1eApj4Jxq4?si=02ab0478b8c642eb
- YouTube: https://www.youtube.com/playlist?list=PLSUh6oJ5ZotWeHtZ6AJT-ZqJtbmR877vl
4h2m
sbt 1.7.1
I’m happy to announce sbt 1.7.1 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.7.1
See 1.7.0 release note for the details on 1.7.x features.
Highlights
- Fixes Java incremental compilation, specifically parsing of annotations in class files of @SethTisue in zinc#1111
sbt 1.7.0
Hi everyone. On behalf of the sbt project, I am happy to announce sbt 1.7.0. This is the seventh 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. Please try it out, and report any issues you might come across.
How to upgrade
Download the official sbt runner from cs setup
, SDKMAN, or download from https://github.com/sbt/sbt/releases/tag/v1.7.0.
The sbt version used for your build is upgraded by putting the following in project/build.properties
:
sbt.version=1.7.0
This mechanism allows that sbt 1.7.0 is used only for the builds that you want.
scopt 4.1.0
scopt 4.1.0 is released. To try new scopt 4.1.0:
libraryDependencies += "com.github.scopt" %% "scopt" % "4.1.0"
scopt 4.1.0 is cross published to the following build matrix:
Scala Version | JVM | JS (1.x) | JS (0.6.x) | Native (0.4.x) |
---|---|---|---|---|
3.x | ✅ | ✅ | n/a | ✅ |
2.13.x | ✅ | ✅ | ✅ | ✅ |
2.12.x | ✅ | ✅ | ✅ | ✅ |
2.11.x | ✅ | ✅ | ✅ | ✅ |
scopt is a little command line options parsing library. See https://eed3si9n.com/scopt4 or readme for the details on how to use scopt.
2022.06 mixtape
- Spotify: https://open.spotify.com/playlist/1k4KYcV3dQO2BbGFPc4JNP?si=b94ba11e72b2420e
- YouTube: https://www.youtube.com/playlist?list=PLSUh6oJ5ZotWwWDuFf_ZvzjnD0XGEloER
3h53m
Eval 0.1.0
I released Eval 0.1.0. Eval evaluates Scala 3 code. It’s a Scala 3 port of Eval
class used in sbt.
package example
import com.eed3si9n.eval.Eval
import com.eed3si9n.eval.EvalReporter
import java.nio.file.Paths
@main def main(): Unit =
val eval = Eval(
backingDir = Paths.get("/tmp/classes"),
mkReporter = () => EvalReporter.store
)
val result = eval.evalInfer("2")
println(result.tpe)
println(result.getValue(this.getClass.getClassLoader))
The above prints:
Int
2
house problems (2022.03 mixtape)
Jar Jar Abrams 1.8.1 and sbt-assembly 1.2.0
Jar Jar Abrams 1.8.1 and sbt-assembly 1.2.0 are released.
Jar Jar Abrams is an experimental extension to Jar Jar Links, intended to shade Scala libraries.
simplifying sbt with common settings
sbt is simple, in a sense that it has a few concepts like settings and tasks, and it achieves a wide variety of things. An idea popped into my head today that could simplify sbt further. I don’t have an implementation on this yet.
sbt 1.6.2
I’m happy to announce sbt 1.6.2 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.6.2
See 1.6.0 release note for the details on 1.6.x features.
Highlights
granularity of testing
In the context of sbt, Bazel, and likely many other build tools, the term test could encompass various levels, and it’s useful to disamgibuate this, especially when we want to configure pre- and post-hooks and parallel execution. In other words, what do we mean when we say “test”? There are four levels to test: test command test modules test class test method/expression test as commandline interface The top-most level is the test command that the build tools provide to the users.sbt 1.6.1
I’m happy to announce sbt 1.6.1 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.6.1
See 1.6.0 release note for the details on 1.6.x features.
Highlights
sbt 1.6.0
Hi everyone. On behalf of the sbt project, I am happy to announce sbt 1.6.0. This is the sixth 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. Please try it out, and report any issues you might come across.
The headline features of sbt 1.6.0 are:
- Improved JDK 17 support
- BSP improvements
- Zinc improvements
- Remote caching improvements
- Tab completion of global keys
sbt 1.5.8
I’m happy to announce sbt 1.5.8 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.8
Highlights
sbt 1.6.0-RC2
Hi everyone. On behalf of the sbt project, I am happy to announce sbt 1.6.0-RC2. This is the sixth 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. Please try it out, and report any issues you might come across.
- If no serious issues are found by Saturday, December 25th 2021, 1.6.0-RC2 will become 1.6.0 final.
If no serious issues are found by Saturday, December 11th 2021, 1.6.0-RC1 will become 1.6.0 final.
The headline features of sbt 1.6.0 are:
- Improved JDK 17 support
- BSP improvements
- Zinc improvements
- Remote caching improvements
- Tab completion of global keys
sbt 1.5.7
I’m happy to announce sbt 1.5.7 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.7
Highlights
sbt 1.5.6
I’m happy to announce sbt 1.5.6 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.6
Highlights
2021.12 mixtape
sudori part 3
I’m hacking on a small project called sudori, an experimental sbt. The initial goal is to port the macro to Scala 3. It’s an exercise to take the macro apart and see if we can build it from the ground up. This an advanced area of Scala 2 and 3, and I’m finding my way around by trial and error. This is part 3. It’s been a while since I wrote part 2, but in between I’ve written intro to Scala 3 macros, which is sort of a sudori prequel.Starlark 4.2.1
Starlark is a dialect of Python, originally designed as a configuration language for the Bazel build tool. Currently there are implementations in Go, Java, and Rust. As far as I know, the main Java implementation of Starlark has only been available as Bazel’s source repo on GitHub. Since it would be convenient to have a binary distribution, I’ve forked the repo, and published it as "com.eed3si9n.starlark" % "starlark" % "4.2.1" (com.JDK 17 on GitHub Actions
Here’s a quick tutorial of how to test your project on JDK 17 using Ólaf’s olafurpg/setup-scala. As the starting point we’ll use the following setup, which is documented in Setting up GitHub Actions with sbt: name: CI on: pull_request: push: jobs: test: strategy: fail-fast: false matrix: include: - os: ubuntu-latest java: 11 jobtype: 1 - os: ubuntu-latest java: 11 jobtype: 2 - os: ubuntu-latest java: 11 jobtype: 3 runs-on: ${{ matrix.intro to Scala 3 macros
Introduction Macro is a fun and powerful tool, but overuse of the macro could cause harm as well. Please enjoy macros responsibly. What is macro? A common explanation given is that a macro is a program that is able to take code as an input and output code. While it’s true, it might not immediately make sense since Scala programmers are often familiar with higher-order functions like (map {...}) and by-name parameter, which on the surface it might seem like it is passing a block of code around.2021.09 mixtape
Jar Jar Abrams 1.8.0 and sbt-assembly 1.1.0
Jar Jar Abrams 1.8.0 and sbt-assembly 1.1.0 are released. Jar Jar Abrams is an experimental extension to Jar Jar Links, intended to shade Scala libraries. Thus far we have been using Pants team’s fork of Jar Jar Links, but now that it’s been abandaned, Eric Peters has in-sourced it to jarjar-abrams repo so we can patch it. Our jarjar fork is released under com.eed3si9n.jarjar organization name and package name. bug fixes Eric has fixed a bug around ShadeRules.sudori part 2
I’m hacking on a small project called sudori, an experimental sbt. The initial goal is to port the macro to Scala 3. It’s an exercise to take the macro apart and see if we can build it from the ground up. This an advanced area of Scala 2 and 3, and I’m finding my way around by trial and error. This is part 2. Reference: Scala 3 Reference: Metaprogramming sudori part 1 Instance When we think of the build.sudori part 1
I’m hacking on a small project called sudori, an experimental sbt. The initial goal is to port the macro to Scala 3. It’s an exercise to take the macro apart and see if we can build it from the ground up. This an advanced area of Scala 2 and 3, and I’m finding my way around by trial and error. Reference: Scala 3 Reference: Metaprogramming Convert I think I’ve identified a basic part called Convert, which doesn’t really depend on anything.sbt 1.5.5
I’m happy to announce sbt 1.5.5 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.5
Highlights
- Various Zinc fixes and enhancements by @ephemerist and @retronym
- Adds
buildTarget/resources
support for BSP #6552 by @samuelClarencTeads - Adds
build.sbt
support for BSP import #6553 by @retronym - Fixes BSP task error handling #6565 by @adpi2
- Fixes remote caching not managing resource files #6554 by @Nirvikalpa108
- Fixes launcher causing
NoClassDefFoundError
when launching sbt 1.4.0 - 1.4.2 launcher#98 by @eed3si9n - Fixes cross-Scala suffix conflict warning involving
_3
lm#383 by @eed3si9n
sbt 1.5.4
I’m happy to announce sbt 1.5.4 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.4 How to upgrade Download the official sbt runner + launcher from SDKMAN or download from https://github.com/sbt/sbt/releases/. In addition, the sbt version used for your build is upgraded by putting the following in project/build.properties: sbt.version=1.5.4 This mechanism allows that sbt 1.5.4 is used only for the builds that you want. Highlights Fixes compiler ClassLoader list to use compilerJars.sbt-assembly 1.0.0
In June of 2011, I started working on sbt-assembly for sbt 0.10, based on Coda Hale’s assembly-sbt from sbt 0.7, which in turn was probably inspired by maven-assembly-plugin. After ten years, I’m going to call this one 1.0.0. sbt-assembly 1.0.0 is published to Maven Central.
sbt 1.5.3
I’m happy to announce sbt 1.5.3 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.3 How to upgrade Download the official sbt runner + launcher from SDKMAN or download from https://github.com/sbt/sbt/releases/. In addition, the sbt version used for your build is upgraded by putting the following in project/build.properties: sbt.version=1.5.3 This mechanism allows that sbt 1.5.3 is used only for the builds that you want. Highlights Fixes scalacOptions not getting forwarded to ScalaDoc in Scala 3 #6499 by @pikinier20 Fixes undercompilation of sealed traits that extends other seal traits zinc#979 by @dwijnand Fixes version parsing not recognizing dots in a prerelease tag lm#377 by @Nirvikalpa108 Fixes inputFile resolving to incorrect files when file specific globs are used io#319 by @eatkins Updates to Scala 2.music inspired by yasuke (2021.06 mixtape)
Scala, Python quick reference
syntax Scala Python immutable variable val x = 1 Starlark: REV = "1.1.0" lazy variable lazy val x = 1 n/a mutable variable var x = 1 in function: x = 1 if expression if (x > 1) "a" else "b" "a" if x > 1 else "b" ———————- —————————- —————————- function def add3(x: Int): Int = x + 3 def add3(x): return x + 3 anonymous function _ * 2 not in Starlark:POM consistency for sbt plugins
There’s a long-standing bug that sbt maintainers have known for a while, which is that when sbt plugin is published to a Maven repository, the POM file sbt generates is not valid. From a mailing list thread titled [0.12] plan for instance, Mark McBride reported it in 2012: On the maven note, the poms generated for plugins aren’t actually valid. Trying to upload them to artifactory without disabling pom consistency checks fails :/sbt 1.5.2
I’m happy to announce sbt 1.5.2 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.2 How to upgrade Download the official sbt runner + launcher from SDKMAN or download from https://github.com/sbt/sbt/releases/. In addition, the sbt version used for your build is upgraded by putting the following in project/build.properties: sbt.version=1.5.2 This mechanism allows that sbt 1.5.2 is used only for the builds that you want. Highlights Fixes sbt new leaving behind target directory #6488 by @eed3si9n Fixes ConcurrentModificationException while compiling Scala 2.Bintray to JFrog Artifactory migration status and sbt 1.5.1
I’m happy to announce sbt 1.5.1 patch release is available. Full release note is here - https://github.com/sbt/sbt/releases/tag/v1.5.1. This post will also report the Bintray to JFrog Artifactory migration. Bintray to JFrog Artifactory migration status First and foremost, I would like to thank JFrog for their continued support of sbt project and the Scala ecosystem. As sbt was taking off in the number of contributors and plugins, we had a Bintray-shaped problem.herding cats: day 19
Wrote herding cats: day 19 featuring FunctionK
, or Rúnar’s encoding of rank-2 polymorphic function, and Resource datatype, which he envisioned rank-N polymorphism would unlock back in 2010.