From 46a204a10717c0e93ffc568a9087c400a62b7a7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:09:42 +0000 Subject: [PATCH 1/9] Bump cachix/install-nix-action from 22 to 23 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 22 to 23. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v22...v23) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 668103b8..3ed5d10a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v3.5.3 - - uses: cachix/install-nix-action@v22 + - uses: cachix/install-nix-action@v23 - uses: cachix/cachix-action@v12 with: From 51541bcaeac26d0f25aaad57dbc22753a17e2ce9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:27:08 +0000 Subject: [PATCH 2/9] Bump actions/cache from 3.3.1 to 3.3.2 Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 668103b8..b6791581 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Cache sbt - uses: actions/cache@v3.3.1 + uses: actions/cache@v3.3.2 with: path: | ~/.sbt From 981e1b3ea081bf6fc050e24862c8882911909679 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:20:36 +0000 Subject: [PATCH 3/9] Bump actions/checkout from 3.5.3 to 4.1.1 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.1.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.5.3...v4.1.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/dependency-graph.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 668103b8..d73e4efd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 30 steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v4.1.1 - uses: cachix/install-nix-action@v22 diff --git a/.github/workflows/dependency-graph.yml b/.github/workflows/dependency-graph.yml index 6cd06289..aa55dcd1 100644 --- a/.github/workflows/dependency-graph.yml +++ b/.github/workflows/dependency-graph.yml @@ -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 From 6d5030d8688e4b00f7752a6651e79b2afdfc1776 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 27 Feb 2024 21:59:56 +0000 Subject: [PATCH 4/9] Update org.eclipse.lsp4j to 0.22.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 506e0824..4536fd2e 100644 --- a/build.sbt +++ b/build.sbt @@ -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.25", "org.http4s" %% "http4s-ember-server" % "0.23.25" % Test, From 0666329b5129a0b1932481706868b0635e7d0126 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 9 Apr 2024 16:01:42 +0000 Subject: [PATCH 5/9] Update smithy-aws-traits to 1.47.0 --- build.sbt | 2 +- smithy-build.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 3672edf0..b34f4af7 100644 --- a/build.sbt +++ b/build.sbt @@ -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), ) diff --git a/smithy-build.json b/smithy-build.json index d604b4a0..b34684b4 100644 --- a/smithy-build.json +++ b/smithy-build.json @@ -3,6 +3,6 @@ "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" + "software.amazon.smithy:smithy-aws-traits:1.47.0" ] } From eff0dc76ad0eef9eb7136a4f3099c8b29c2033a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Fri, 12 Apr 2024 00:12:16 +0200 Subject: [PATCH 6/9] bump smithy4s/alloy --- .../test/scala/playground/smithyql/CompilationTests.scala | 2 +- .../test/scala/playground/language/CompletionTests.scala | 6 +++--- .../resources/test-workspaces/default/smithy-build.json | 2 +- project/plugins.sbt | 7 ++++++- smithy-build.json | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala b/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala index 4a5c9327..3b7d5d4d 100644 --- a/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala +++ b/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala @@ -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)), ) diff --git a/modules/language-support/src/test/scala/playground/language/CompletionTests.scala b/modules/language-support/src/test/scala/playground/language/CompletionTests.scala index 2a4b5d84..dedb1ee5 100644 --- a/modules/language-support/src/test/scala/playground/language/CompletionTests.scala +++ b/modules/language-support/src/test/scala/playground/language/CompletionTests.scala @@ -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(_)) @@ -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)) && @@ -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(_)) diff --git a/modules/lsp/src/test/resources/test-workspaces/default/smithy-build.json b/modules/lsp/src/test/resources/test-workspaces/default/smithy-build.json index 65ec8e62..72dda0f9 100644 --- a/modules/lsp/src/test/resources/test-workspaces/default/smithy-build.json +++ b/modules/lsp/src/test/resources/test-workspaces/default/smithy-build.json @@ -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" ] } diff --git a/project/plugins.sbt b/project/plugins.sbt index 390e4710..96b2c0a2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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") diff --git a/smithy-build.json b/smithy-build.json index b34684b4..db696f47 100644 --- a/smithy-build.json +++ b/smithy-build.json @@ -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", + "com.disneystreaming.smithy4s:smithy4s-protocol:0.18.15", "software.amazon.smithy:smithy-aws-traits:1.47.0" ] } From b4c901f6dba2ebca2dd4afddd4b31874f193f620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Fri, 12 Apr 2024 00:14:20 +0200 Subject: [PATCH 7/9] Add missing WorkspaceFolder param --- modules/e2e/src/test/scala/playground/e2e/E2ETests.scala | 9 ++++++--- .../lsp/harness/LanguageServerIntegrationTests.scala | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala b/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala index 7ca8f8c7..660664d9 100644 --- a/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala +++ b/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala @@ -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 ) ) diff --git a/modules/lsp/src/test/scala/playground/lsp/harness/LanguageServerIntegrationTests.scala b/modules/lsp/src/test/scala/playground/lsp/harness/LanguageServerIntegrationTests.scala index fd6b0607..6a898c2d 100644 --- a/modules/lsp/src/test/scala/playground/lsp/harness/LanguageServerIntegrationTests.scala +++ b/modules/lsp/src/test/scala/playground/lsp/harness/LanguageServerIntegrationTests.scala @@ -24,7 +24,7 @@ trait LanguageServerIntegrationTests { ): InitializeParams = new InitializeParams().tap( _.setWorkspaceFolders( List( - new WorkspaceFolder(workspaceDir.value) + new WorkspaceFolder(workspaceDir.value, "test-workspace") ).asJava ) ) From c21499967626d65e124e53bd2e34c4536d53a29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Fri, 12 Apr 2024 00:21:14 +0200 Subject: [PATCH 8/9] bump scala --- build.sbt | 4 ++-- modules/core/src/main/scala/playground/FileCompiler.scala | 1 - modules/core/src/main/scala/playground/FileRunner.scala | 1 - modules/core/src/main/scala/playground/PreludeCompiler.scala | 1 - .../main/scala/playground/language/CompletionVisitor.scala | 2 +- .../src/main/scala/playground/language/Uri.scala | 5 ++++- .../main/scala/playground/smithyql/parser/v2/scanner.scala | 1 - 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index c37e1feb..e5b3fe27 100644 --- a/build.sbt +++ b/build.sbt @@ -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 := "-" diff --git a/modules/core/src/main/scala/playground/FileCompiler.scala b/modules/core/src/main/scala/playground/FileCompiler.scala index 105b45c9..8e2afaa0 100644 --- a/modules/core/src/main/scala/playground/FileCompiler.scala +++ b/modules/core/src/main/scala/playground/FileCompiler.scala @@ -1,7 +1,6 @@ package playground import cats.Parallel -import cats.effect.implicits._ import cats.implicits._ import cats.~> import playground._ diff --git a/modules/core/src/main/scala/playground/FileRunner.scala b/modules/core/src/main/scala/playground/FileRunner.scala index 35738bb7..acf5bb9d 100644 --- a/modules/core/src/main/scala/playground/FileRunner.scala +++ b/modules/core/src/main/scala/playground/FileRunner.scala @@ -1,7 +1,6 @@ package playground import cats.data.NonEmptyList -import cats.effect.implicits._ import cats.implicits._ import playground._ import playground.smithyql.SourceFile diff --git a/modules/core/src/main/scala/playground/PreludeCompiler.scala b/modules/core/src/main/scala/playground/PreludeCompiler.scala index b98e6e61..ae1a23dc 100644 --- a/modules/core/src/main/scala/playground/PreludeCompiler.scala +++ b/modules/core/src/main/scala/playground/PreludeCompiler.scala @@ -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._ diff --git a/modules/language-support/src/main/scala/playground/language/CompletionVisitor.scala b/modules/language-support/src/main/scala/playground/language/CompletionVisitor.scala index b8262c32..2cf78414 100644 --- a/modules/language-support/src/main/scala/playground/language/CompletionVisitor.scala +++ b/modules/language-support/src/main/scala/playground/language/CompletionVisitor.scala @@ -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 = diff --git a/modules/language-support/src/main/scala/playground/language/Uri.scala b/modules/language-support/src/main/scala/playground/language/Uri.scala index c7895bc8..1abbbe30 100644 --- a/modules/language-support/src/main/scala/playground/language/Uri.scala +++ b/modules/language-support/src/main/scala/playground/language/Uri.scala @@ -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))) diff --git a/modules/parser/src/main/scala/playground/smithyql/parser/v2/scanner.scala b/modules/parser/src/main/scala/playground/smithyql/parser/v2/scanner.scala index 19946228..f0b4fb82 100644 --- a/modules/parser/src/main/scala/playground/smithyql/parser/v2/scanner.scala +++ b/modules/parser/src/main/scala/playground/smithyql/parser/v2/scanner.scala @@ -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 From d74fb10a52512616dedadfe420e6bd265769ac78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Fri, 12 Apr 2024 00:21:59 +0200 Subject: [PATCH 9/9] unused import --- modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala b/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala index b2e2881f..ce967389 100644 --- a/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala +++ b/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala @@ -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