Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala3 -> 3.1.0 #21

Merged
merged 5 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
os: [ubuntu-latest]
# java: [adopt@1.8, adopt@1.11, 17]
java: [adopt@1.8]
scalaVersion: ["2_12", "2_13", "3_0"]
scalaVersion: ["2_12", "2_13", "3_1"]
scalaPlatform: ["jvm", "js", "native"]
exclude:
- scalaVersion: "3_0"
- scalaVersion: "3_1"
scalaPlatform: "native"
runs-on: ${{ matrix.os }}
env:
Expand Down
4 changes: 3 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version = "3.0.6"
version = "3.2.0"

runner.dialect = scala213source3

align.preset = "more"

Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ val Ver = new {

val Scala = new {
val `2_12` = "2.12.15"
val `2_13` = "2.13.6"
val `3` = "3.0.2"
val `2_13` = "2.13.7"
val `3` = "3.1.0"

val only_2 = Seq(`2_12`, `2_13`)
val only_2_13 = Seq(`2_13`)
Expand Down
2 changes: 1 addition & 1 deletion modules/builders/src/main/scala/MdocConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object MdocJSConfig {

val enabled = attrs.optionalOne("scala-mdoc-js").getOrElse("false").toBoolean
val dependencies = attrs.optionalOne("scala-mdoc-js-dependencies").map(_.split(",").toList).getOrElse(Nil)
val scalaJSVersion = attrs.optionalOne("scala-mdoc-js-version").getOrElse("1.1.0")
val scalaJSVersion = attrs.optionalOne("scala-mdoc-js-version").getOrElse("1.7.1")

if (enabled) Some(MdocJSConfig(dependencies, scalaJSVersion)) else None
}
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/Logger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ trait Colors {
import Console._

private lazy val colors = true
//System.console() != null && System.getenv().get("TERM") != null
// System.console() != null && System.getenv().get("TERM") != null

def _blue(s: String) = if (!colors) s else CYAN + s + RESET
def _red(s: String) = if (!colors) s else RED + s + RESET
Expand Down
4 changes: 2 additions & 2 deletions modules/core/src/main/scala/mdoc/Mdoc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ case class ScalaJSConfig(
)

object ScalaJSConfig {
def default = ScalaJSConfig(version = "1.5.0", "1.0.0")
def default = ScalaJSConfig(version = "1.7.1", "1.0.0")

def fromAttrs(attrs: Discover.YamlAttributes): Option[ScalaJSConfig] = {
val enabled = attrs.optionalOne("mdoc-js").map(_.toBoolean).getOrElse(false)
Expand Down Expand Up @@ -63,7 +63,7 @@ object MdocConfiguration {
MdocConfiguration(
scalaBinaryVersion = BuildInfo.scalaBinaryVersion,
scalaVersion = BuildInfo.scalaVersion,
mdocVersion = "2.2.23",
mdocVersion = "2.2.24",
inheritClasspath = true,
inheritVariables = true,
variables = Map.empty,
Expand Down
10 changes: 4 additions & 6 deletions modules/core/src/main/scala/mdoc/MdocJS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class MdocJS(
files: Seq[os.Path]
): Seq[(os.Path, ScalaJSResult)] = {
val dependencies = config.extraDependencies
val tempDir = os.temp.dir()
val tempDir = os.temp.dir(deleteOnExit = false)
val opts = Classpath.Path(optsFolder(dependencies))

val logger = logging.at("MDOC.JS")
Expand All @@ -182,13 +182,11 @@ class MdocJS(
"java",
"-classpath",
(runnerCp.cp + opts).render(config),
"mdoc.Main"
// "--classpath",
// fetchCp(dependencies)
"mdoc.Main",
"--classpath",
fetchCp(dependencies)
) ++ argmap

// command.foreach(println)

os.proc(command)
.call(
_pwd,
Expand Down
1 change: 0 additions & 1 deletion modules/core/src/main/scala/mdoc/MdocJSProcessor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class MdocJSProcessor[C] private (pwd: os.Path, toMdocFile: PartialFunction[C, M
override def retrieve(content: C): MdocJSResult[C] = {

val triggerKey = internalTriggers(content)
println(triggerKey)

if (!internalResults.contains(triggerKey)) {
val filesToProcess = internalFiles(triggerKey)
Expand Down
133 changes: 0 additions & 133 deletions modules/core/src/test/scala/MdocBatchTests.scala

This file was deleted.

2 changes: 1 addition & 1 deletion modules/search/indexer/src/test/scala/IndexerTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class IndexerSuite extends munit.FunSuite {
)

val idx =
Indexer.default(content).processAll { case (path, sections) => //Document.section(s"Document at $path", path, text)
Indexer.default(content).processAll { case (path, sections) => // Document.section(s"Document at $path", path, text)

Document(
s"Document at $path",
Expand Down
8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
resolvers += Resolver.sonatypeRepo("snapshots")

addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.4")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.31")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.7.0")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0")
addSbtPlugin("com.indoorvivants" % "sbt-commandmatrix" % "0.0.4+2-6d7e7dcf-SNAPSHOT")