Skip to content

Commit

Permalink
Upgrade to Scala 3.5.0, and related spring cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Aug 24, 2024
1 parent 3be5e74 commit 83c76f0
Show file tree
Hide file tree
Showing 36 changed files with 42 additions and 83 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ ThisBuild / versionScheme := Some("early-semver")
ThisBuild / scalaVersion := scala3Version

lazy val tyrianVersion = TyrianVersion.getVersion
lazy val scala3Version = "3.4.2"
lazy val scala3Version = "3.5.0"
lazy val tyrianDocsVersion = "0.11.0"
lazy val scalaJsDocsVersion = "1.16.0"
lazy val scalaDocsVersion = "3.4.2"
lazy val scalaDocsVersion = "3.5.0"

lazy val commonSettings: Seq[sbt.Def.Setting[_]] = Seq(
version := tyrianVersion,
Expand Down
1 change: 1 addition & 0 deletions examples/.scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ DisableSyntax {
# noUniversalEqualityMessage = "== and != are unsafe since they allow comparing two unrelated types"
# regex = []
}
OrganizeImports.targetDialect = Scala3
2 changes: 1 addition & 1 deletion examples/.tyrian-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.11.0
4 changes: 1 addition & 3 deletions examples/bootstrap/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/bootstrap-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/bootstrap-fastopt/main.js";

TyrianApp.launch("myapp");
2 changes: 1 addition & 1 deletion examples/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sbtwelcome._
Global / onChangedBuildSource := ReloadOnSourceChanges

lazy val tyrianVersion = TyrianVersion.getVersion
lazy val scala3Version = "3.4.1"
lazy val scala3Version = "3.5.0"

lazy val commonSettings: Seq[sbt.Def.Setting[_]] = Seq(
version := tyrianVersion,
Expand Down
4 changes: 1 addition & 3 deletions examples/clock/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/clock-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/clock-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/counter/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/counter-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/counter-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/debouncing/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/debouncing-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/debouncing-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/electron/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/electron-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/electron-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/field/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/field-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/field-fastopt/main.js";

TyrianApp.launch("myapp");
1 change: 0 additions & 1 deletion examples/fs2/src/main/scala/example/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package example
import cats.effect.IO
import tyrian.Html.*
import tyrian.*
import tyrian.cmds.Logger

import scala.concurrent.duration.*
import scala.scalajs.js.annotation.*
Expand Down
4 changes: 1 addition & 3 deletions examples/fs2/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/fs2-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/fs2-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/http/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/http-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/http-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/http4s-dom/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/http4s-dom-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/http4s-dom-fastopt/main.js";

TyrianApp.launch("myapp");
3 changes: 0 additions & 3 deletions examples/main-launcher/src/main/scala/example/ChatApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import cats.effect.IO
import tyrian.Html.*
import tyrian.*

import scala.scalajs.js
import scala.scalajs.js.annotation.*

object ChatApp extends TyrianIOApp[ChatAppMsg, ChatAppModel]:

def router: Location => ChatAppMsg = Routing.none(ChatAppMsg.NoOp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import cats.effect.IO
import tyrian.Html.*
import tyrian.*

import scala.scalajs.js.annotation.*
import scala.util.Try

object CounterApp extends TyrianIOApp[Msg, Model]:
Expand Down
1 change: 0 additions & 1 deletion examples/main-launcher/src/main/scala/example/Main.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package example

import cats.effect.IO
import tyrian.Html.*
import tyrian.*

object Main {
Expand Down
4 changes: 1 addition & 3 deletions examples/mario/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/mario-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/mario-fastopt/main.js";

TyrianApp.launch("mario");
2 changes: 1 addition & 1 deletion examples/mill/.mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.4
0.11.12
2 changes: 1 addition & 1 deletion examples/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.8
sbt.version=1.10.1
10 changes: 5 additions & 5 deletions examples/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4")
addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.3.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.4.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
4 changes: 2 additions & 2 deletions examples/server-examples/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ val LogbackVersion = "1.2.6"
val MunitCatsEffectVersion = "1.0.6"

lazy val tyrianVersion = TyrianVersion.getVersion
lazy val scala3Version = "3.4.1"
lazy val scala3Version = "3.5.0"

Global / onChangedBuildSource := ReloadOnSourceChanges

Expand Down Expand Up @@ -36,7 +36,7 @@ lazy val server =
"io.circe" %% "circe-generic" % CirceVersion,
"org.typelevel" %% "munit-cats-effect-3" % MunitCatsEffectVersion % Test,
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"io.indigoengine" %% "tyrian" % tyrianVersion
"io.indigoengine" %% "tyrian-tags" % tyrianVersion
)
)

Expand Down
2 changes: 1 addition & 1 deletion examples/server-examples/project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sbt.version=1.9.8
sbt.version=1.10.1

10 changes: 5 additions & 5 deletions examples/server-examples/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import org.http4s.Header
import org.http4s.headers.`Content-Type`
import org.http4s.MediaType
import org.http4s.StaticFile
import java.io.File
import fs2.io.file.Files
import tyrian.Tyrian

object Routes:

Expand All @@ -25,7 +23,7 @@ object Routes:
case request @ GET -> Root / "spa.js" =>
val spa = fs2.io.file.Path(
"."
) / "spa" / "target" / "scala-3.4.1" / "spa-opt" / "main.js"
) / "spa" / "target" / "scala-3.5.0" / "spa-opt" / "main.js"
StaticFile.fromPath(spa.absolute, Some(request)).getOrElseF(NotFound(spa.absolute.toString))

case GET -> Root / "ssr" / in =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.example.example

import cats.Applicative
import cats.implicits.*
import org.http4s.EntityEncoder
import tyrian.*
import tyrian.Html.*

Expand Down
4 changes: 1 addition & 3 deletions examples/subcomponents/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/subcomponents-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/subcomponents-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/tailwind/src/main/html/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from '../../../target/scala-3.3.1/tailwind-fastopt/main.js';
import { TyrianApp } from "../../../target/scala-3.5.0/tailwind-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/websocket/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/websocket-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/websocket-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 1 addition & 3 deletions examples/zio/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './target/scala-3.3.1/zio-fastopt/main.js';
import { TyrianApp } from "./target/scala-3.5.0/zio-fastopt/main.js";

TyrianApp.launch("myapp");
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ addSbtPlugin("org.xerial.sbt" %% "sbt-sonatype" % "3.10.0")
addSbtPlugin("com.github.sbt" %% "sbt-pgp" % "2.2.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.4.0")
Expand Down
4 changes: 1 addition & 3 deletions sandbox-zio/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {
TyrianApp
} from './.js/target/scala-3.4.2/sandbox-zio-fastopt/main.js';
import { TyrianApp } from "./.js/target/scala-3.5.0/sandbox-zio-fastopt/main.js";

TyrianApp.launch("myapp");
6 changes: 2 additions & 4 deletions sandbox/tyrianapp.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import {
TyrianApp
} from './.js/target/scala-3.4.2/sandbox-fastopt/main.js';
import { TyrianApp } from "./.js/target/scala-3.5.0/sandbox-fastopt/main.js";

TyrianApp.launch(document.getElementById("myapp"), {
"message": "Hello, Tyrian!"
message: "Hello, Tyrian!",
});
1 change: 0 additions & 1 deletion tyrian/src/main/scala/tyrian/http/Request.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tyrian.http

import scala.concurrent.duration.FiniteDuration
import scala.concurrent.duration._

/** Describes an HTTP request.
Expand Down
2 changes: 1 addition & 1 deletion website/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import scala.concurrent.duration.DurationInt
import laika.sbt.LaikaPreviewConfig
import java.time.OffsetDateTime

ThisBuild / scalaVersion := "3.4.1"
ThisBuild / scalaVersion := "3.5.0"

enablePlugins(LaikaPlugin, GhpagesPlugin)

Expand Down
2 changes: 1 addition & 1 deletion website/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.8
sbt.version=1.10.1

0 comments on commit 83c76f0

Please sign in to comment.