Skip to content

Commit

Permalink
Merge branch 'main' into examples-trait-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Apr 11, 2024
2 parents 0b26593 + 4d7966c commit a853b2e
Show file tree
Hide file tree
Showing 99 changed files with 379 additions and 287 deletions.
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
38 changes: 19 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inThisBuild(
)
)

import scala.sys.process._
import scala.sys.process.*

def crossPlugin(
x: sbt.librarymanagement.ModuleID
Expand All @@ -27,15 +27,15 @@ val compilerPlugins =
Nil
else
List(
crossPlugin("org.typelevel" % "kind-projector" % "0.13.2")
crossPlugin("org.typelevel" % "kind-projector" % "0.13.3")
))

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 All @@ -44,10 +44,10 @@ val commonSettings = Seq(
organization := "com.kubukoz.playground",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.10.0",
"org.typelevel" %% "cats-mtl" % "1.3.1",
"com.disneystreaming" %% "weaver-cats" % "0.8.3" % Test,
"com.disneystreaming" %% "weaver-discipline" % "0.8.3" % Test,
"com.disneystreaming" %% "weaver-scalacheck" % "0.8.3" % Test,
"org.typelevel" %% "cats-mtl" % "1.4.0",
"com.disneystreaming" %% "weaver-cats" % "0.8.4" % Test,
"com.disneystreaming" %% "weaver-discipline" % "0.8.4" % Test,
"com.disneystreaming" %% "weaver-scalacheck" % "0.8.4" % Test,
"com.softwaremill.diffx" %% "diffx-core" % "0.9.0" % Test,
"com.softwaremill.diffx" %% "diffx-cats" % "0.9.0" % Test,
),
Expand Down Expand Up @@ -95,10 +95,10 @@ lazy val source = module("source")
lazy val parser = module("parser")
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-parse" % "0.3.10",
"org.typelevel" %% "cats-parse" % "1.0.0",
"io.circe" %% "circe-generic" % "0.14.6" % Test,
"io.circe" %% "circe-parser" % "0.14.6" % Test,
"co.fs2" %% "fs2-io" % "3.9.2" % Test,
"co.fs2" %% "fs2-io" % "3.10.2" % Test,
)
)
.dependsOn(
Expand All @@ -124,14 +124,14 @@ lazy val formatter = module("formatter")
lazy val core = module("core")
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.5.2",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.24.1",
"org.typelevel" %% "cats-effect" % "3.5.4",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.28.4",
"com.disneystreaming.smithy4s" %% "smithy4s-dynamic" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %% "smithy4s-http4s" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %% "smithy4s-aws-http4s" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" % "smithy4s-protocol" % smithy4sVersion.value % Test,
"com.disneystreaming.alloy" % "alloy-core" % "0.2.8" % Test,
"software.amazon.smithy" % "smithy-aws-traits" % "1.39.1" % Test,
"com.disneystreaming.alloy" % "alloy-core" % "0.3.6" % Test,
"software.amazon.smithy" % "smithy-aws-traits" % "1.47.0" % Test,
),
Smithy4sCodegenPlugin.defaultSettings(Test),
)
Expand All @@ -152,12 +152,12 @@ lazy val languageSupport = module("language-support")
lazy val lsp = module("lsp")
.settings(
libraryDependencies ++= Seq(
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.21.1",
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.22.0",
"io.circe" %% "circe-core" % "0.14.6",
"org.http4s" %% "http4s-ember-client" % "0.23.23",
"org.http4s" %% "http4s-ember-server" % "0.23.23" % Test,
"io.get-coursier" %% "coursier" % "2.1.7",
"org.typelevel" %% "cats-tagless-core" % "0.15.0",
"org.http4s" %% "http4s-ember-client" % "0.23.26",
"org.http4s" %% "http4s-ember-server" % "0.23.26" % Test,
"io.get-coursier" %% "coursier" % "2.1.9",
"org.typelevel" %% "cats-tagless-core" % "0.16.0",
),
buildInfoPackage := "playground.lsp.buildinfo",
buildInfoKeys ++= Seq(version, scalaBinaryVersion),
Expand Down
2 changes: 1 addition & 1 deletion modules/ast/src/main/scala/playground/smithyql/AST.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import cats.Functor
import cats.Id
import cats.Show
import cats.data.NonEmptyList
import cats.implicits._
import cats.kernel.Eq
import cats.kernel.Order
import cats.syntax.all.*
import cats.~>

/** The main type for AST nodes of SmithyQL. The type parameter `F[_]` is a type constructor that
Expand Down
2 changes: 1 addition & 1 deletion modules/ast/src/main/scala/playground/smithyql/DSL.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package playground.smithyql

import cats.Id
import cats.implicits._
import cats.syntax.all.*

object DSL {

Expand Down
4 changes: 2 additions & 2 deletions modules/ast/src/test/scala/playground/Assertions.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package playground

import cats.Id
import cats.implicits._
import cats.syntax.all.*
import com.softwaremill.diffx.Diff
import com.softwaremill.diffx.ShowConfig
import playground.smithyql._
import playground.smithyql.*
import weaver.Expectations
import weaver.SourceLocation

Expand Down
7 changes: 4 additions & 3 deletions modules/core/src/main/scala/playground/CompilationError.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package playground
import cats.Id
import cats.data.IorNel
import cats.data.NonEmptyList
import cats.implicits._
import cats.kernel.Eq
import playground.CompilationErrorDetails._
import playground.smithyql._
import cats.kernel.Order.catsKernelOrderingForOrder
import cats.syntax.all.*
import playground.CompilationErrorDetails.*
import playground.smithyql.*
import playground.smithyql.format.Formatter
import smithy.api.TimestampFormat
import smithy4s.ShapeId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package playground

import cats.MonadThrow
import cats.implicits._
import cats.syntax.all.*
import smithy4s.Document
import smithy4s.Endpoint
import smithy4s.Service
import smithy4s.kinds._
import smithy4s.kinds.*
import smithy4s.schema.Schema

class DynamicServiceProxy[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _]](
Expand Down
5 changes: 2 additions & 3 deletions modules/core/src/main/scala/playground/FileCompiler.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package playground

import cats.Parallel
import cats.effect.implicits._
import cats.implicits._
import cats.syntax.all.*
import cats.~>
import playground._
import playground.*
import playground.smithyql.SourceFile
import playground.smithyql.WithSource

Expand Down
5 changes: 2 additions & 3 deletions modules/core/src/main/scala/playground/FileRunner.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package playground

import cats.data.NonEmptyList
import cats.effect.implicits._
import cats.implicits._
import playground._
import cats.syntax.all.*
import playground.*
import playground.smithyql.SourceFile
import playground.smithyql.SourceRange
import playground.smithyql.WithSource
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/playground/IorUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import cats.data.Ior
import cats.data.Ior.Both
import cats.data.Ior.Left
import cats.data.Ior.Right
import cats.implicits._
import cats.kernel.Semigroup
import cats.syntax.all.*

object IorUtils {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package playground

import cats.data.EitherNel
import cats.implicits._
import cats.syntax.all.*
import playground.smithyql.OperationName
import playground.smithyql.QualifiedIdentifier
import playground.smithyql.QueryOperationName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package playground

import cats.Contravariant
import cats.Id
import cats.implicits._
import cats.syntax.all.*
import playground.smithyql.Binding
import playground.smithyql.BooleanLiteral
import playground.smithyql.Identifier
Expand Down Expand Up @@ -35,7 +35,7 @@ import smithy4s.schema.EnumTag
import smithy4s.schema.EnumValue
import smithy4s.schema.Field
import smithy4s.schema.Primitive
import smithy4s.schema.Primitive._
import smithy4s.schema.Primitive.*
import smithy4s.schema.Schema
import smithy4s.schema.SchemaVisitor

Expand Down
10 changes: 5 additions & 5 deletions modules/core/src/main/scala/playground/OperationCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import cats.data.Ior
import cats.data.IorNel
import cats.data.Kleisli
import cats.data.NonEmptyList
import cats.implicits._
import cats.syntax.all.*
import cats.~>
import playground._
import playground.*
import playground.smithyql.Prelude
import playground.smithyql.QualifiedIdentifier
import playground.smithyql.Query
Expand All @@ -16,9 +16,9 @@ import smithy.api
import smithy4s.Endpoint
import smithy4s.Service
import smithy4s.dynamic.DynamicSchemaIndex
import smithyql.syntax._
import types._
import util.chaining._
import smithyql.syntax.*
import types.*
import util.chaining.*

trait CompiledInput {
type _Op[_, _, _, _, _]
Expand Down
10 changes: 5 additions & 5 deletions modules/core/src/main/scala/playground/OperationRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import cats.data.NonEmptyList
import cats.effect.Async
import cats.effect.MonadCancelThrow
import cats.effect.Resource
import cats.effect.implicits._
import cats.effect.implicits.*
import cats.effect.std
import cats.implicits._
import cats.syntax.all.*
import fs2.compression.Compression
import org.http4s.Uri
import org.http4s.client.Client
import playground._
import playground.*
import playground.plugins.PlaygroundPlugin
import playground.plugins.SimpleHttpBuilder
import playground.smithyql.InputNode
Expand All @@ -36,9 +36,9 @@ import smithy4s.aws.AwsClient
import smithy4s.aws.AwsEnvironment
import smithy4s.dynamic.DynamicSchemaIndex
import smithy4s.http4s.SimpleRestJsonBuilder
import smithy4s.kinds._
import smithy4s.kinds.*
import smithy4s.schema.Schema
import smithyql.syntax._
import smithyql.syntax.*

trait OperationRunner[F[_]] {

Expand Down
4 changes: 2 additions & 2 deletions modules/core/src/main/scala/playground/PlaygroundConfig.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package playground

import cats.implicits._
import cats.kernel.Eq
import cats.syntax.all.*
import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec
import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker

Expand Down Expand Up @@ -73,7 +73,7 @@ object PlaygroundConfig {

}

import com.github.plokhotnyuk.jsoniter_scala.core._
import com.github.plokhotnyuk.jsoniter_scala.core.*

val decode: Array[Byte] => Either[Throwable, PlaygroundConfig] =
bytes =>
Expand Down
7 changes: 3 additions & 4 deletions modules/core/src/main/scala/playground/PreludeCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ 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._
import playground._
import cats.mtl.implicits.*
import cats.syntax.all.*
import playground.*
import playground.smithyql.Prelude
import playground.smithyql.WithSource

Expand Down
6 changes: 3 additions & 3 deletions modules/core/src/main/scala/playground/QueryCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package playground
import cats.Apply
import cats.data.IorNec
import cats.data.NonEmptyChain
import cats.implicits._
import playground.CompilationErrorDetails._
import playground.smithyql._
import cats.syntax.all.*
import playground.CompilationErrorDetails.*
import playground.smithyql.*

import QueryCompiler.WAST

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import cats.Id
import cats.data.Ior
import cats.data.NonEmptyChain
import cats.data.NonEmptyList
import cats.implicits._
import playground.CompilationErrorDetails._
import playground.smithyql._
import playground.smithyutil._
import cats.syntax.all.*
import playground.CompilationErrorDetails.*
import playground.smithyql.*
import playground.smithyutil.*
import smithy.api
import smithy.api.TimestampFormat
import smithy4s.Bijection
Expand Down Expand Up @@ -45,8 +45,8 @@ import smithy4s.schema.Primitive.PUUID
import smithy4s.schema.Schema
import smithy4s.schema.SchemaVisitor
import smithy4s.~>
import types._
import util.chaining._
import types.*
import util.chaining.*

import java.util.Base64
import java.util.UUID
Expand Down
4 changes: 2 additions & 2 deletions modules/core/src/main/scala/playground/ServiceIndex.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package playground

import cats.Id
import cats.implicits._
import cats.syntax.all.*
import playground.smithyql.OperationName
import playground.smithyql.QualifiedIdentifier
import smithy.api
import smithy4s.dynamic.DynamicSchemaIndex
import smithyql.syntax._
import smithyql.syntax.*

// Abstraction for service metadata. Can be used by multi-service compilers/runners/completion providers etc.
trait ServiceIndex {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package playground
import aws.api
import playground.smithyql.QualifiedIdentifier
import smithy4s.Service
import smithyql.syntax._
import smithyql.syntax.*

object ServiceNameExtractor {

Expand Down
Loading

0 comments on commit a853b2e

Please sign in to comment.