-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop 2.12 support, add scalafmt, scalafix, MiMa
Source and binary compat preserved. The code changes: - scalafmt and scalafix formatting applied - added type annotations to public members and implicits - migrated to Scala 3 syntax for imports - since 2.12 is not supported anymore, replaced CurrentThreadExecutionContext wrapper with direct usage of ExecutionContext.parasitic. This as well leads to removal of the direct dependency on executor-tools as it is not used in the project anymore.
- Loading branch information
Showing
29 changed files
with
294 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ jobs: | |
matrix: | ||
scala: | ||
- 2.13.14 | ||
- 2.12.19 | ||
- 3.3.3 | ||
|
||
steps: | ||
|
@@ -25,7 +24,7 @@ jobs: | |
java-version: [email protected] | ||
|
||
- name: build ${{ matrix.scala }} | ||
run: sbt ++${{ matrix.scala }} clean coverage test | ||
run: sbt ++${{ matrix.scala }} clean check coverage test | ||
|
||
- name: test coverage | ||
if: success() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
rules = [OrganizeImports] | ||
|
||
OrganizeImports { | ||
preset = INTELLIJ_2020_3 | ||
removeUnused = false # `true` is not supported in Scala 3.3.0 | ||
targetDialect = Auto | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version = 3.8.3 | ||
|
||
runner.dialect = scala213source3 | ||
|
||
maxColumn = 110 | ||
trailingCommas = multiple | ||
|
||
align.preset = some | ||
indent.defnSite = 2 | ||
indent.caseSite = 5 | ||
indent.extendSite = 2 | ||
indentOperator.exclude = "^(&&|\\|\\||~)$" | ||
newlines.avoidForSimpleOverflow = [punct, tooLong, slc] | ||
newlines.source = keep | ||
newlines.implicitParamListModifierForce = [after] | ||
spaces.beforeContextBoundColon = always | ||
spaces.inInterpolatedStringCurlyBraces = true | ||
verticalMultiline.atDefnSite = true | ||
verticalMultiline.arityThreshold = 3 | ||
verticalMultiline.newlineAfterOpenParen = true | ||
danglingParentheses.exclude = [] | ||
docstrings.oneline = fold | ||
docstrings.wrap = no | ||
importSelectors = singleLine | ||
|
||
rewrite.rules = [ | ||
RedundantParens, | ||
SortModifiers, | ||
] | ||
|
||
rewrite.sortModifiers.order = [ | ||
"override", | ||
"private", | ||
"protected", | ||
"implicit", | ||
"final", | ||
"sealed", | ||
"abstract", | ||
"lazy", | ||
] |
34 changes: 18 additions & 16 deletions
34
benchmark/src/main/scala/com/evolutiongaming/concurrent/sequentially/Common.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
package com.evolutiongaming.concurrent.sequentially | ||
|
||
import java.util.concurrent.TimeUnit | ||
import org.openjdk.jmh.annotations.* | ||
|
||
import org.openjdk.jmh.annotations._ | ||
import java.util.concurrent.TimeUnit | ||
|
||
@State(Scope.Benchmark) | ||
@Warmup(iterations = 5) | ||
@Measurement(iterations = 10) | ||
@Fork(value = 1, jvmArgs = Array( | ||
"-server", | ||
"-Xms1g", | ||
"-Xmx1g", | ||
"-XX:NewSize=512m", | ||
"-XX:MaxNewSize=512m", | ||
"-XX:InitialCodeCacheSize=256m", | ||
"-XX:ReservedCodeCacheSize=256m", | ||
"-XX:-UseBiasedLocking", | ||
"-XX:+AlwaysPreTouch", | ||
"-XX:+UseParallelGC")) | ||
@Fork( | ||
value = 1, | ||
jvmArgs = Array( | ||
"-server", | ||
"-Xms1g", | ||
"-Xmx1g", | ||
"-XX:NewSize=512m", | ||
"-XX:MaxNewSize=512m", | ||
"-XX:InitialCodeCacheSize=256m", | ||
"-XX:ReservedCodeCacheSize=256m", | ||
"-XX:-UseBiasedLocking", | ||
"-XX:+AlwaysPreTouch", | ||
"-XX:+UseParallelGC", | ||
), | ||
) | ||
@BenchmarkMode(Array(Mode.Throughput)) | ||
@OutputTimeUnit(TimeUnit.SECONDS) | ||
abstract class Common { | ||
|
||
} | ||
abstract class Common {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2") | ||
|
||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12") | ||
|
||
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") | ||
|
||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1") | ||
addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.0.9") | ||
|
||
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1") | ||
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.