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

Library bumps #404

Merged
merged 13 commits into from
Apr 11, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ jobs:
timeout-minutes: 30
steps:

- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4.1.1

- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v23

- uses: cachix/cachix-action@v12
with:
name: kubukoz
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Cache sbt
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
path: |
~/.sbt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4.1.1
- uses: scalacenter/sbt-dependency-submission@v2
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ThisBuild / versionScheme := Some("early-semver")

Global / onChangedBuildSource := ReloadOnSourceChanges

ThisBuild / scalaVersion := "2.13.11"
ThisBuild / crossScalaVersions := Seq("2.13.11")
ThisBuild / scalaVersion := "2.13.13"
ThisBuild / crossScalaVersions := Seq("2.13.13")

// For coursier's "latest.integration"
ThisBuild / dynverSeparator := "-"
Expand Down Expand Up @@ -131,7 +131,7 @@ lazy val core = module("core")
"com.disneystreaming.smithy4s" %% "smithy4s-aws-http4s" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" % "smithy4s-protocol" % smithy4sVersion.value % Test,
"com.disneystreaming.alloy" % "alloy-core" % "0.3.6" % Test,
"software.amazon.smithy" % "smithy-aws-traits" % "1.45.0" % Test,
"software.amazon.smithy" % "smithy-aws-traits" % "1.47.0" % Test,
),
Smithy4sCodegenPlugin.defaultSettings(Test),
)
Expand All @@ -152,7 +152,7 @@ lazy val languageSupport = module("language-support")
lazy val lsp = module("lsp")
.settings(
libraryDependencies ++= Seq(
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.21.2",
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.22.0",
"io.circe" %% "circe-core" % "0.14.6",
"org.http4s" %% "http4s-ember-client" % "0.23.26",
"org.http4s" %% "http4s-ember-server" % "0.23.26" % Test,
Expand Down
1 change: 0 additions & 1 deletion modules/core/src/main/scala/playground/FileCompiler.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package playground

import cats.Parallel
import cats.effect.implicits._
import cats.implicits._
import cats.~>
import playground._
Expand Down
1 change: 0 additions & 1 deletion modules/core/src/main/scala/playground/FileRunner.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package playground

import cats.data.NonEmptyList
import cats.effect.implicits._
import cats.implicits._
import playground._
import playground.smithyql.SourceFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package playground
import cats.Applicative
import cats.Parallel
import cats.data.NonEmptyList
import cats.effect.implicits._
import cats.implicits._
import cats.mtl.Chronicle
import cats.mtl.implicits._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ object CompilationTests extends SimpleIOSuite with Checkers {
CompilationError.error(
CompilationErrorDetails.UnknownEnumValue(
"POISON",
List("FIRE", "LIGHTNING", "WIND", "ICE"),
List("ICE", "FIRE", "LIGHTNING", "WIND"),
),
SourceRange(Position(0), Position(0)),
)
Expand Down
9 changes: 6 additions & 3 deletions modules/e2e/src/test/scala/playground/e2e/E2ETests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ object E2ETests extends SimpleIOSuite {
): InitializeParams = new InitializeParams()
.tap(
_.setWorkspaceFolders(
workspaceFolders.map { path =>
new WorkspaceFolder(path.toNioPath.toUri().toString())
}.asJava
workspaceFolders
.zipWithIndex
.map { case (path, i) =>
new WorkspaceFolder(path.toNioPath.toUri().toString(), s"test-workspace-$i")
}
.asJava
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ object CompletionVisitor extends SchemaVisitor[CompletionResolver] {
inBody =
fields
// todo: filter out present fields
.sortBy(field => (field.isStrictlyRequired, field.label))
.sortBy(field => (field.isRequired && !field.hasDefaultValue, field.label))
.map(CompletionItem.fromField)
.toList,
inValue =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import fs2.io.file.Path
import java.net.URI
import java.nio.file.Paths

final case class Uri private (
// not making constructor private because
// "access modifiers from `copy` method are copied from the case class constructor"
// cannot nicely be silenced in scala 2
final case class Uri /* private */ (
value: String
) extends AnyVal {
def toPath: Path = Path.fromNioPath(Paths.get(new URI(value)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ object CompletionTests extends FunSuite {
val completions = getCompletions(Power.schema, NodeContext.EmptyPath)

val inserts = completions.map(_.insertText)
val expectedInserts = List("FIRE", "LIGHTNING", "WIND", "ICE")
val expectedInserts = List("ICE", "FIRE", "LIGHTNING", "WIND")
.map(s => s"\"$s\"")
.map(InsertText.JustString(_))

Expand All @@ -187,7 +187,7 @@ object CompletionTests extends FunSuite {
val completions = getCompletions(Power.schema, NodeContext.EmptyPath.inQuotes)

val inserts = completions.map(_.insertText)
val expectedInserts = List("FIRE", "LIGHTNING", "WIND", "ICE")
val expectedInserts = List("ICE", "FIRE", "LIGHTNING", "WIND")
.map(InsertText.JustString(_))

assert(completions.map(_.kind).forall(_ == CompletionItemKind.EnumMember)) &&
Expand All @@ -207,7 +207,7 @@ object CompletionTests extends FunSuite {

val inserts = completions.map(_.insertText)

val expectedInserts = List("FIRE", "LIGHTNING", "WIND", "ICE")
val expectedInserts = List("ICE", "FIRE", "LIGHTNING", "WIND")
.map(_ + " = ")
.map(InsertText.JustString(_))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package playground.lsp
import cats.Applicative
import cats.FlatMap
import cats.MonadThrow
import cats.effect.implicits._
import cats.effect.kernel.Async
import cats.implicits._
import cats.parse.LocationMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"imports": ["./weather.smithy", "./no-runner.smithy"],
"mavenDependencies": [
"com.disneystreaming.alloy:alloy-core:0.3.6",
"com.disneystreaming.smithy4s:smithy4s-protocol:0.18.2"
"com.disneystreaming.smithy4s:smithy4s-protocol:0.18.15"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ trait LanguageServerIntegrationTests {
): InitializeParams = new InitializeParams().tap(
_.setWorkspaceFolders(
List(
new WorkspaceFolder(workspaceDir.value)
new WorkspaceFolder(workspaceDir.value, "test-workspace")
).asJava
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package playground.smithyql.parser.v2.scanner

import cats.kernel.Eq
import cats.parse.Numbers
import cats.syntax.all.*

import scala.annotation.nowarn

Expand Down
7 changes: 6 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml"
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.3")

// remove when smithy4s catches up: https://github.com/disneystreaming/smithy4s/pull/1485 + release
libraryDependencies ++= Seq(
"software.amazon.smithy" % "smithy-model" % "1.47.0"
)

// try to keep in sync with smithy-build.json
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.18.8")
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.18.15")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1")
Expand Down
4 changes: 2 additions & 2 deletions smithy-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"imports": ["modules/core/src/test/smithy"],
"mavenDependencies": [
"com.disneystreaming.alloy:alloy-core:0.3.6",
"com.disneystreaming.smithy4s:smithy4s-protocol:0.18.9",
"software.amazon.smithy:smithy-aws-traits:1.45.0"
"com.disneystreaming.smithy4s:smithy4s-protocol:0.18.15",
"software.amazon.smithy:smithy-aws-traits:1.47.0"
]
}
Loading