8000 Update sbt-lucuma-lib to 0.14.8 by lucuma-steward[bot] · Pull Request #733 · gemini-hlsw/clue · GitHub
[go: up one dir, main page]

Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -48,7 +48,7 @@ jobs:
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 11
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -124,7 +124,7 @@ jobs:
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 11
Expand All @@ -137,7 +137,7 @@ jobs:
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
Expand Down Expand Up @@ -180,12 +180,12 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 11
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# this file by hand! Instead, if you wish to make changes, you should
# make a PR to sbt-lucuma.

version = "3.8.3"
version = "3.9.10"
style = default

runner.dialect = scala3
Expand Down
9 changes: 4 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ThisBuild / tlBaseVersion := "0.49"
ThisBuild / tlCiReleaseBranches := Seq("master")
ThisBuild / tlJdkRelease := Some(8)
ThisBuild / githubWorkflowJavaVersions := Seq("11", "17").map(JavaSpec.temurin(_))
ThisBuild / scalaVersion := "3.7.1"
ThisBuild / scalaVersion := "3.7.4"
Global / onChangedBuildSource := ReloadOnSourceChanges

lazy val root = tlCrossRootProject
Expand Down Expand Up @@ -126,7 +126,7 @@ lazy val genRules =
.in(file("gen/rules"))
.settings(
moduleName := "clue-generator",
scalaVersion := "2.13.16",
scalaVersion := "2.13.17",
libraryDependencies ++=
Settings.Libraries.Grackle.value ++
Settings.Libraries.ScalaFix.value ++
Expand Down Expand Up @@ -200,9 +200,8 @@ lazy val sbtPlugin =
"coreModule" -> (core.jvm / moduleName).value
),
buildInfoOptions += BuildInfoOption.PackagePrivate,
Test / test := {
scripted.toTask("").value
},
Test / test :=
scripted.toTask("").value,
scripted := scripted
.dependsOn(
genRules / publishLocal,
Expand Down
7 changes: 3 additions & 4 deletions core/src/main/scala/clue/websocket/ApolloClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ class ApolloClient[F[_], P, S](
F.async(cb =>
startSubscription[D](document, operationName, variables)
.flatMap(subscription =>
subscription.stream.attempt.head.compile.onlyOrError.attempt.map(>
cb(onlyOrError.flatten)
)
subscription.stream.attempt.head.compile.onlyOrError.attempt
.map( cb(onlyOrError.flatten))
)
.as(none) // Don't return a cancellation cleanup. Subscription is cleaned up whenm stream is finalized.
)
Expand Down Expand Up @@ -204,7 +203,7 @@ class ApolloClient[F[_], P, S](
state.get.flatMap:
case Connected(_, connection, _, _) =>
connection.send(StreamingMessage.FromClient.Pong(payload)) // Respond the same payload.
case _ => F.unit
case _ => F.unit
case _ => s"Unexpected message received from server: [$msg]".warnF
}

Expand Down
9 changes: 7 additions & 2 deletions gen/rules/src/main/scala/clue/gen/Generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ trait Generator {
val allInits = inits ++ extending.map(t => init"${Type.Name(t)}()")

(newParentBody :+
q"sealed trait ${Type.Name(name)} ${buildTemplate(early, allInits, (none, pars.map(paramToVal)))}",
q"sealed trait ${Type.Name(
name
)} ${buildTemplate(early, allInits, (none, pars.map(paramToVal)))}",
true
)
}
Expand Down Expand Up @@ -531,7 +533,10 @@ trait Generator {
case Defn.Object(mods, objName, Template.Initial(early, inits, self, body))
if objName.value == moduleName =>
(
newStats :+ q"..$mods object $objName ${buildTemplate(early, inits, (self.some, bodyMod(body)))}",
newStats :+ q"..$mods object $objName ${buildTemplate(early,
inits,
(self.some, bodyMod(body))
)}",
true
)
case other =>
Expand Down
8 changes: 6 additions & 2 deletions gen/rules/src/main/scala/clue/gen/GraphQLGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ class GraphQLGen(config: GraphQLGenConfig)
indented(obj)(
List(
q"..$newMods object ${Term
.Name(objName)} ${buildTemplate(early, inits, (self.some, modObjDefs(stats)))}".toString
.Name(
objName
)} ${buildTemplate(early, inits, (self.some, modObjDefs(stats)))}".toString
).mkString("\n")
)
) + Patch.removeGlobalImport(GraphQLAnnotation.symbol)
Expand Down Expand Up @@ -261,7 +263,9 @@ class GraphQLGen(config: GraphQLGenConfig)
indented(obj)(
List(
q"..$newMods object ${Term
.Name(objName)} ${buildTemplate(early, inits, (self.some, modObjDefs(stats)))}".toString
.Name(
objName
)} ${buildTemplate(early, inits, (self.some, modObjDefs(stats)))}".toString
).mkString("\n")
)
) + Patch.removeGlobalImport(GraphQLAnnotation.symbol)
Expand Down
4 changes: 2 additions & 2 deletions gen/rules/src/main/scala/clue/gen/QueryGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,12 @@ trait QueryGen extends Generator {
_._1 match {
case UntypedInlineFragment(typeName, _, _) =>
typeName // Selection in inline fragment, group by discriminator
case _ =>
case _ =>
none // Selection in base group, group by none
}
}
.toList
.sortBy(_._2.head._2) // Sort by first appeareance of each subtype
.sortBy(_._2.head._2) // Sort by first appeareance of each subtype
.map { // Resolve groups
case (Some(typeName), subQueries) =>
(typeName.some, // Unwrap inline fragment selections
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.13.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.3")
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.14.8")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.4")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
10 changes: 4 additions & 6 deletions sbt-plugin/src/main/scala/clue/sbt/CluePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ object CluePlugin extends AutoPlugin {
)

override def projectSettings: Seq[Setting[_]] = Seq(
Compile / clueSourceDirectory := {
Compile / clueSourceDirectory :=
crossProjectCrossType.?.value
.flatMap { crossType =>
crossType.sharedSrcDir(baseDirectory.value, "clue").map(_.getParentFile)
}
.getOrElse(sourceDirectory.value / "clue")
},
.getOrElse(sourceDirectory.value / "clue"),
Compile / sourceGenerators ++= (Compile / clueSourceGenerators).value, // workaround for sbt/sbt#7173
libraryDependencies += BuildInfo.organization %%% BuildInfo.coreModule % BuildInfo.version,
// another workaround
Expand Down Expand Up @@ -72,9 +71,8 @@ object CluePlugin extends AutoPlugin {
}.taskValue,

// register clean
LocalProject(proj.id) / clueClean := {
clean.value
},
LocalProject(proj.id) / clueClean :=
clean.value,

// scalafix stuff
semanticdbEnabled := true,
Expand Down
Loading
0