See https://github.com/sbt/sbt/wiki/sbt-1.x-plugin-migration for the list with sbt 1.x migration status.
| plugin | star |
|---|---|
| playframework/playframework | 9597 |
| scala-js/scala-js | 3053 |
| sbt/sbt-assembly | 1092 |
| mpeltonen/sbt-idea | 1085 |
| var StringExpressionParser = function () { | |
| this.operators = [ | |
| '+', '-', '*', '/', '^' | |
| ]; | |
| this.priorities = [ | |
| ['*', '/'], | |
| ['+', '-'] | |
| ]; | |
| }; |
See https://github.com/sbt/sbt/wiki/sbt-1.x-plugin-migration for the list with sbt 1.x migration status.
| plugin | star |
|---|---|
| playframework/playframework | 9597 |
| scala-js/scala-js | 3053 |
| sbt/sbt-assembly | 1092 |
| mpeltonen/sbt-idea | 1085 |
| import scala.language.higherKinds | |
| import scala.language.implicitConversions | |
| object TestNewtypes extends App { | |
| /** | |
| Changed lines: | |
| type NewType = Newtype[T, Tag0] with superduper.Tag[T, this.type] | |
| def apply[TagIn, Sub, C](c: C)(implicit tagger: Tagger[TagIn, Type, Tag, Sub, C]): NewType = c.asInstanceOf[T with NewType] |
| // allows converting one class to another by providing missing fields | |
| object convert { | |
| @annotation.implicitNotFound(""" | |
| You have not provided enough arguments to convert from ${In} to ${Out}. | |
| ${Args} | |
| """) | |
| trait Convertible[Args, In, Out] { | |
| def apply(args: Args, in: In): Out | |
| } |
| import cats.effect._ | |
| import java.net.InetSocketAddress | |
| import java.nio.channels.AsynchronousChannelGroup | |
| import java.util.concurrent.Executors | |
| import fs2.Stream | |
| import cats.implicits._ |
| COLLECTION 0 1 5 10 50 100 500 1000 | |
| Array[Int] 16 24 40 56 216 416 2016 4016 | |
| immutable.BitSet 24 24 24 24 24 32 96 160 | |
| immutable.IntMap[Int] 16 40 328 688 3568 7168 35968 71968 | |
| immutable.List[Int] 16 56 216 416 2016 4016 20016 40016 | |
| immutable.Map[Int,Int] 16 40 304 720 4856 9680 53504 111760 | |
| immutable.Queue[Int] 40 80 240 440 2040 4040 20040 40040 | |
| immutable.Set[Int] 16 32 264 480 3016 5840 27696 57952 | |
| immutable.SortedMap[Int,Int] 40 88 280 520 2440 4840 30008 62008 | |
| immutable.SortedSet[Int] 40 104 296 536 2456 |
| import java.util.HashMap; | |
| import java.util.UUID; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| import java.util.concurrent.TimeUnit; | |
| import scala.collection.concurrent.TrieMap; | |
| import org.openjdk.jmh.annotations.*; | |
| @BenchmarkMode(Mode.AverageTime) |
| sealed trait Path | |
| case class Field(name: String, child: Option[Path]) extends Path { | |
| override def toString: String = child match { | |
| case None => name | |
| case Some(path) => s"$name.$path" | |
| } | |
| } |
| package demo | |
| import cats.{Applicative, Functor, Id, Semigroupal, Traverse} | |
| import cats.arrow.FunctionK | |
| /** | |
| * Type-lifting operation to replace the wildcard type (i.e. _). | |
| * | |
| * In some cases we end up with code like: List[Option[_]]. This is | |
| * fine unless you later need to write code in terms of a particular |