Skip to content

Instantly share code, notes, and snippets.

View eed3si9n's full-sized avatar

eugene yokota eed3si9n

View GitHub Profile
@eed3si9n
eed3si9n / SimpleProcessBuilder.java
Last active March 15, 2020 17:39
A lot might not be needed post Java 1.7.
/*
* sbt
* Licensed under Apache License 2.0 (see LICENSE)
*/
package org.scalasbt.sbtw;
import java.io.IOException;
import java.io.OutputStream;
import java.io.InputStream;
@eed3si9n
eed3si9n / # sbt - 2020-01-15_01-26-06.txt
Created February 24, 2020 15:24
sbt on macOS 10.14.3 - Homebrew build logs
Homebrew build logs for sbt on macOS 10.14.3
Build date: 2020-01-15 01:26:06
@eed3si9n
eed3si9n / java-version.txt
Last active January 30, 2020 20:03
java -version examples
$ java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)
@eed3si9n
eed3si9n / SI-10127.scala
Created October 28, 2019 02:21
SI-10127
sealed abstract class Bool
case class True() extends Bool
case class False() extends Bool
sealed abstract class Nat
case class Zero() extends Nat
case class Succ (rec_x1:Nat) extends Nat
sealed abstract class Int
case class Pos (rec_x1:Nat) extends Int
@eed3si9n
eed3si9n / sbt.log
Created October 17, 2019 23:14
Cygwin issue
$ sbt
[info] Loading settings for project global-plugins from foo.sbt ...
[info] Loading global plugins from C:\Users\eed3si9n\.sbt\1.0\plugins
[info] Loading project definition from C:\cygwin64\home\eed3si9n\work\hello\project
[info] Compiling 1 Scala source to C:\cygwin64\home\eed3si9n\work\hello\project\target\scala-2.12\sbt-1.0\classes ...
[info] Done compiling.
[info] Loading settings for project root from build.sbt ...
[info] Set current project to Hello (in build file:/C:/cygwin64/home/eed3si9n/work/hello/)
[error] java.io.IOException: Could not create directory C:\cygwin64\home\eed3si9n\work\hello\target\streams\_global\_global\checkBuildSources\_global\inputFileStamps: java.nio.file.AccessDeniedException: C:\cygwin64\home\eed3si9n\work\hello\target\streams\_global\_global\checkBuildSources\_global
[error] Use 'last' for the full log.
@eed3si9n
eed3si9n / build.sbt
Created October 14, 2019 03:44
-Yno-lub testing
import Util._
import Dependencies._
import Sxr.sxr
import com.typesafe.tools.mima.core._, ProblemFilters._
import local.Scripted
import scala.xml.{ Node => XmlNode, NodeSeq => XmlNodeSeq, _ }
import scala.xml.transform.{ RewriteRule, RuleTransformer }
import scala.util.Try
ThisBuild / version := {
sbt new lampepfl/dotty.g8
Copying runtime jar.
[info] [launcher] getting org.scala-sbt sbt 1.3.2 (this may take some time)...
downloading https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.3.2/sbt-1.3.2.jar ...
downloading https://repo1.maven.org/maven2/org/scala-sbt/io_2.12/1.3.1/io_2.12-1.3.1.jar ...
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.10/scala-library-2.12.10.jar ...
downloading https://repo1.maven.org/maven2/org/scala-sbt/main_2.12/1.3.2/main_2.12-1.3.2.jar ...
:: loading settings :: url = jar:file:/root/.sdkman/candidates/sbt/1.3.2/bin/sbt-launch.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: loading settings :: url = jar:file:/root/.sdkman/candidates/sbt/1.3.2/bin/sbt-launch.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: loading settings :: url = jar:file:/root/.sdkman/candidates/sbt/1.3.2/bin/sbt-launch.jar!/org/apache/ivy/core/settings/ivysettings.xml
sbt:foo> pgp-cmd gen-key
Please enter the name associated with the key: foo
Please enter the email associated with the key: foo@example.com
Please enter the passphrase for the key: ****
Please re-enter the passphrase for the key: ****
[info] Creating a new PGP key, this could take a long time.
[info] Public key := /home/demiourgos1/.sbt/gpg/pubring.asc
[info] Secret key := /home/demiourgos1/.sbt/gpg/secring.asc
[info] Please do not share your secret key. Your public key is free to share.
[info] Compiling 14 Scala sources to /Users/eed3si9n/work/scala-modules/scala/build/quick/classes/library ...
[error] /Users/eed3si9n/work/scala-modules/scala/src/library/scala/StringContext.scala:272:28: object min is not a member of package math
[error] case s => math.min(s, inputIndex)
[error] ^
[error] /Users/eed3si9n/work/scala-modules/scala/src/library/scala/StringContext.scala:276:28: object max is not a member of package math
[error] case s => math.max(s, inputIndex)
[error] ^
[error] /Users/eed3si9n/work/scala-modules/scala/src/library/scala/collection/Factory.scala:52:52: object max is not a member of package math
[error] val b = new mutable.StringBuilder(scala.math.max(0, it.knownSize))
[error] ^

Compatibility note

As usual for minor releases, Scala 2.12.9 is binary compatible with the whole Scala 2.12 series.

Scala.js users must update to 0.6.28+ or 1.0.0-M8+ for compatibility with Scala 2.12.9. (#7375)

Highlights of 2.12.9

  • Improved compiler performance. Benchmarks of compiler performance have improved by between 5% and 10% since 2.12.8, thanks to many performance optimizations (mostly by Jason Zaugg and Diego E. Alonso-Blas: kudos!)