scala

warning: Creating default object from empty value in /opt/bitnami/apps/portal/htdocs/modules/taxonomy/taxonomy.pages.inc on line 33.

joining Twitter

in

I'm excited to announce that I'm joining Twitter's Build Team to work on the next generation of efficient build systems supporting thousands of Twitter developers worldwide. Today's my first day.

This is the team that developed monorepo build tool Pants, and is transitioning to migrate the flock to Bazel. This presented a unique opportunity for me to work with a team of people passionate about developer experience and productivity, and I'm looking forward to getting to know the team, and learning the new challenges.

I would also like to thank everyone who reached out to me during this transition period, often on DM, to check up on me, to stick up for me for an opportunity in their organization, and offering me projects to work on. You kept my spirits high. Thank you! Since my mandatory sabbatical started in April, I got to work on some of the projects that I previously didn't have time like build caching and Selective functor, and got to collaborate with wonderful folks at Scala Center, so it worked out in the end.

EE Build team is still hiring for "San Francisco, Remote US" location, so if that sounds interesting to you, I'd happy to talk to you.

Jar Jar Abrams

in

Jar Jar Abrams is an experimental Scala extension of Jar Jar Links, a utility to shade Java libraries.

For library authors, the idea of other library is a double-edged sword. On one hand, using other libraries avoids unnecessary duplication of work, not using other libraries is almost hypocritical. On the other hand, each library you add would add a transitive dependency to your users, increasing the possibility of conflict. This is partly due to the fact that within a single running program you can one have one version of a library.

user-land compiler warnings in Scala, part 2

in

Last week I wrote about #8820, my proposal to add user-land compiler warnings in Scala. The example I had was implementing ApiMayChange annotation. This was ok as a start, but a bit verbose. If we want some API status to be used frequently, it would be cool if library authors could define their own status annotation. We're going to look into doing that today.

user-land compiler warnings in Scala

in

As a library author, I've been wanting to tag methods in Scala that can trigger custom warnings or compiler errors. Why would I want to intentionally cause a compiler error? One potential use case is displaying a migration message for a removed API. A week ago, I sent #8820 to scala/scala proposing the idea of @apiStatus that enables user-land compiler warnings and errors.

equal protection under Eq law

in

The relationship given to Int and Long should be exactly the same as the relationship third-party library like Spire can write UInt or Rational with the first-class numeric types.

  • We should make 1 == 1L an error under strictEquality
  • We should allow custom types to participate in constant expression conversion using FromDigits

liberty, equality, and boxed primitive types

in
  • Scala 2.x uses universal equality which allows comparison of Int and String. Dotty introduces "multiversal" strictEquality that works similar to Eq typeclass.
  • Currently both Scala 2.x and Dotty use Java's == to compare unboxed primitive types. This mixes comparison of Int with Float and Double etc.
  • Float is narrower than Int, and Double is narrower than Long.
  • Because Scala transparently boxes Int into java.lang.Integer as (1: Any), it implements cooperative equality for == and ##, but not for equals and hashCode, which emulates widening for boxed primitive types. Many people are unaware of this behavior, and this could lead to surprising bugs if people believed that equals is same as ==.
  • We might be able to remove cooperative equality if we are willing to make unboxed primitive comparison of different types 1L == 1 an error.

Giter8 0.12.0

in

giter8.version

I added a small app called giter8-launcher for Giter8 0.12.0. The purpose of the app is to make the behavior of the Giter8 template more predictable. Today, template authors may create a template for some version of Giter8 X, but the users might use some other version of Giter8 Y that ships with "sbt new."

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.

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
Syndicate content