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

  • 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."

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