From 4d7966cd432111dba09fa3426d6800c34568bde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Fri, 12 Apr 2024 00:32:52 +0200 Subject: [PATCH] Move imports to new syntax + change cats imports --- build.sbt | 2 +- .../main/scala/playground/smithyql/AST.scala | 2 +- .../main/scala/playground/smithyql/DSL.scala | 2 +- .../test/scala/playground/Assertions.scala | 4 ++-- .../scala/playground/CompilationError.scala | 7 ++++--- .../playground/DynamicServiceProxy.scala | 4 ++-- .../main/scala/playground/FileCompiler.scala | 4 ++-- .../main/scala/playground/FileRunner.scala | 4 ++-- .../src/main/scala/playground/IorUtils.scala | 2 +- .../playground/MultiServiceResolver.scala | 2 +- .../scala/playground/NodeEncoderVisitor.scala | 4 ++-- .../scala/playground/OperationCompiler.scala | 10 +++++----- .../scala/playground/OperationRunner.scala | 10 +++++----- .../scala/playground/PlaygroundConfig.scala | 4 ++-- .../scala/playground/PreludeCompiler.scala | 6 +++--- .../main/scala/playground/QueryCompiler.scala | 6 +++--- .../playground/QueryCompilerVisitor.scala | 12 +++++------ .../main/scala/playground/ServiceIndex.scala | 4 ++-- .../playground/ServiceNameExtractor.scala | 2 +- .../playground/smithyql/NodeContext.scala | 4 ++-- .../playground/smithyql/RangeIndex.scala | 2 +- .../scala/playground/smithyql/syntax.scala | 2 +- .../smithyutil/AddDynamicRefinements.scala | 8 ++++---- .../scala/playground/std/StdlibRuntime.scala | 2 +- .../src/test/scala/playground/Diffs.scala | 6 +++--- .../test/scala/playground/IorUtilsTests.scala | 4 ++-- .../MultiServiceResolverTests.scala | 14 ++++++------- .../scala/playground/NodeEncoderTests.scala | 4 ++-- .../playground/PreludeCompilerTests.scala | 12 +++++------ .../ServiceNameExtractorTests.scala | 2 +- .../playground/smithyql/AtPositionTests.scala | 6 +++--- .../smithyql/CompilationTests.scala | 20 +++++++++---------- .../test/scala/playground/e2e/E2ETests.scala | 12 +++++------ .../smithyql/format/Formatter.scala | 7 ++++--- .../smithyql/format/FormattingTests.scala | 12 +++++------ .../language/CodeLensProvider.scala | 4 ++-- .../playground/language/CommandProvider.scala | 2 +- .../language/CommandResultReporter.scala | 2 +- .../language/CompletionProvider.scala | 5 +++-- .../language/CompletionVisitor.scala | 8 ++++---- .../language/DiagnosticProvider.scala | 4 ++-- .../language/DocumentSymbolProvider.scala | 2 +- .../language/FormattingProvider.scala | 2 +- .../language/TextDocumentProvider.scala | 2 +- .../language/CodeLensProviderTests.scala | 12 +++++------ .../language/CompletionItemTests.scala | 8 ++++---- .../language/CompletionProviderTests.scala | 12 +++++------ .../playground/language/CompletionTests.scala | 10 +++++----- .../language/DiagnosticProviderTests.scala | 10 +++++----- .../scala/playground/language/Diffs.scala | 2 +- .../DocumentSymbolProviderTests.scala | 6 +++--- .../language/FormattingProviderTests.scala | 3 +-- .../scala/playground/lsp/BuildLoader.scala | 2 +- .../playground/lsp/ConfigurationValue.scala | 2 +- .../scala/playground/lsp/LanguageClient.scala | 6 +++--- .../scala/playground/lsp/LanguageServer.scala | 12 +++++------ .../src/main/scala/playground/lsp/Main.scala | 2 +- .../scala/playground/lsp/MainServer.scala | 2 +- .../scala/playground/lsp/ModelLoader.scala | 8 ++++---- .../lsp/PlaygroundLanguageServerAdapter.scala | 6 +++--- .../scala/playground/lsp/PluginResolver.scala | 2 +- .../scala/playground/lsp/ServerBuilder.scala | 4 ++-- .../scala/playground/lsp/ServerLoader.scala | 2 +- .../playground/lsp/TextDocumentManager.scala | 2 +- .../scala/playground/lsp/converters.scala | 6 +++--- .../playground/lsp/util/KleisliOps.scala | 2 +- .../playground/lsp/EmptyConfigTests.scala | 2 +- ...ageServerIntegrationTestSharedServer.scala | 12 +++++------ ...LanguageServerReloadIntegrationTests.scala | 6 +++--- .../playground/lsp/ModelLoaderTests.scala | 6 +++--- .../playground/lsp/PluginResolverTests.scala | 2 +- .../LanguageServerIntegrationTests.scala | 4 ++-- .../playground/lsp/harness/TestClient.scala | 2 +- .../playground/smithyql/parser/Parsers.scala | 8 ++++---- .../smithyql/parser/SourceParser.scala | 4 ++-- .../playground/smithyql/parser/Codecs.scala | 4 ++-- .../smithyql/parser/CommentParsingTests.scala | 2 +- .../playground/smithyql/parser/Diffs.scala | 2 +- .../smithyql/parser/ParserSuite.scala | 10 +++++----- .../parser/generative/ListParserTests.scala | 6 +++--- .../generative/PreludeParserTests.scala | 6 +++--- .../parser/generative/QueryParserTests.scala | 6 +++--- .../generative/SourceFileParserTests.scala | 6 +++--- .../parser/generative/StructParserTests.scala | 6 +++--- .../generative/UseServiceParserTests.scala | 6 +++--- .../parser/v2/ScannerExampleTests.scala | 4 ++-- .../smithyql/parser/v2/ScannerSuite.scala | 6 +++--- .../smithyql/parser/v2/ScannerTests.scala | 8 ++++---- .../playground/plugins/PlaygroundPlugin.scala | 2 +- .../playground/smithyql/WithSource.scala | 2 +- .../scala/playground/smithyql/Diffs.scala | 4 ++-- 91 files changed, 244 insertions(+), 242 deletions(-) diff --git a/build.sbt b/build.sbt index e5b3fe27..9a2b82f2 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ inThisBuild( ) ) -import scala.sys.process._ +import scala.sys.process.* def crossPlugin( x: sbt.librarymanagement.ModuleID diff --git a/modules/ast/src/main/scala/playground/smithyql/AST.scala b/modules/ast/src/main/scala/playground/smithyql/AST.scala index 3adc2baf..2b44037c 100644 --- a/modules/ast/src/main/scala/playground/smithyql/AST.scala +++ b/modules/ast/src/main/scala/playground/smithyql/AST.scala @@ -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 diff --git a/modules/ast/src/main/scala/playground/smithyql/DSL.scala b/modules/ast/src/main/scala/playground/smithyql/DSL.scala index 25808edc..85e62adb 100644 --- a/modules/ast/src/main/scala/playground/smithyql/DSL.scala +++ b/modules/ast/src/main/scala/playground/smithyql/DSL.scala @@ -1,7 +1,7 @@ package playground.smithyql import cats.Id -import cats.implicits._ +import cats.syntax.all.* object DSL { diff --git a/modules/ast/src/test/scala/playground/Assertions.scala b/modules/ast/src/test/scala/playground/Assertions.scala index 23207841..ea0f7ddd 100644 --- a/modules/ast/src/test/scala/playground/Assertions.scala +++ b/modules/ast/src/test/scala/playground/Assertions.scala @@ -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 diff --git a/modules/core/src/main/scala/playground/CompilationError.scala b/modules/core/src/main/scala/playground/CompilationError.scala index 1aeded31..b8b44acf 100644 --- a/modules/core/src/main/scala/playground/CompilationError.scala +++ b/modules/core/src/main/scala/playground/CompilationError.scala @@ -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 diff --git a/modules/core/src/main/scala/playground/DynamicServiceProxy.scala b/modules/core/src/main/scala/playground/DynamicServiceProxy.scala index b5e15479..1f677484 100644 --- a/modules/core/src/main/scala/playground/DynamicServiceProxy.scala +++ b/modules/core/src/main/scala/playground/DynamicServiceProxy.scala @@ -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[_, _, _, _, _]]( diff --git a/modules/core/src/main/scala/playground/FileCompiler.scala b/modules/core/src/main/scala/playground/FileCompiler.scala index 8e2afaa0..d79a7529 100644 --- a/modules/core/src/main/scala/playground/FileCompiler.scala +++ b/modules/core/src/main/scala/playground/FileCompiler.scala @@ -1,9 +1,9 @@ package playground import cats.Parallel -import cats.implicits._ +import cats.syntax.all.* import cats.~> -import playground._ +import playground.* import playground.smithyql.SourceFile import playground.smithyql.WithSource diff --git a/modules/core/src/main/scala/playground/FileRunner.scala b/modules/core/src/main/scala/playground/FileRunner.scala index acf5bb9d..a118273b 100644 --- a/modules/core/src/main/scala/playground/FileRunner.scala +++ b/modules/core/src/main/scala/playground/FileRunner.scala @@ -1,8 +1,8 @@ package playground import cats.data.NonEmptyList -import cats.implicits._ -import playground._ +import cats.syntax.all.* +import playground.* import playground.smithyql.SourceFile import playground.smithyql.SourceRange import playground.smithyql.WithSource diff --git a/modules/core/src/main/scala/playground/IorUtils.scala b/modules/core/src/main/scala/playground/IorUtils.scala index 351b379f..3d677dc2 100644 --- a/modules/core/src/main/scala/playground/IorUtils.scala +++ b/modules/core/src/main/scala/playground/IorUtils.scala @@ -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 { diff --git a/modules/core/src/main/scala/playground/MultiServiceResolver.scala b/modules/core/src/main/scala/playground/MultiServiceResolver.scala index f81a664b..15c5fc7c 100644 --- a/modules/core/src/main/scala/playground/MultiServiceResolver.scala +++ b/modules/core/src/main/scala/playground/MultiServiceResolver.scala @@ -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 diff --git a/modules/core/src/main/scala/playground/NodeEncoderVisitor.scala b/modules/core/src/main/scala/playground/NodeEncoderVisitor.scala index 37a346ce..8afd771e 100644 --- a/modules/core/src/main/scala/playground/NodeEncoderVisitor.scala +++ b/modules/core/src/main/scala/playground/NodeEncoderVisitor.scala @@ -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 @@ -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 diff --git a/modules/core/src/main/scala/playground/OperationCompiler.scala b/modules/core/src/main/scala/playground/OperationCompiler.scala index 631d34a8..38079273 100644 --- a/modules/core/src/main/scala/playground/OperationCompiler.scala +++ b/modules/core/src/main/scala/playground/OperationCompiler.scala @@ -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 @@ -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[_, _, _, _, _] diff --git a/modules/core/src/main/scala/playground/OperationRunner.scala b/modules/core/src/main/scala/playground/OperationRunner.scala index ed018e0c..32e0beb3 100644 --- a/modules/core/src/main/scala/playground/OperationRunner.scala +++ b/modules/core/src/main/scala/playground/OperationRunner.scala @@ -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 @@ -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[_]] { diff --git a/modules/core/src/main/scala/playground/PlaygroundConfig.scala b/modules/core/src/main/scala/playground/PlaygroundConfig.scala index f37dfb23..c224497d 100644 --- a/modules/core/src/main/scala/playground/PlaygroundConfig.scala +++ b/modules/core/src/main/scala/playground/PlaygroundConfig.scala @@ -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 @@ -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 => diff --git a/modules/core/src/main/scala/playground/PreludeCompiler.scala b/modules/core/src/main/scala/playground/PreludeCompiler.scala index ae1a23dc..6bfbc511 100644 --- a/modules/core/src/main/scala/playground/PreludeCompiler.scala +++ b/modules/core/src/main/scala/playground/PreludeCompiler.scala @@ -3,10 +3,10 @@ package playground import cats.Applicative import cats.Parallel import cats.data.NonEmptyList -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 diff --git a/modules/core/src/main/scala/playground/QueryCompiler.scala b/modules/core/src/main/scala/playground/QueryCompiler.scala index bdbaa400..ec5e2b1f 100644 --- a/modules/core/src/main/scala/playground/QueryCompiler.scala +++ b/modules/core/src/main/scala/playground/QueryCompiler.scala @@ -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 diff --git a/modules/core/src/main/scala/playground/QueryCompilerVisitor.scala b/modules/core/src/main/scala/playground/QueryCompilerVisitor.scala index e8f90cc6..7edbdf58 100644 --- a/modules/core/src/main/scala/playground/QueryCompilerVisitor.scala +++ b/modules/core/src/main/scala/playground/QueryCompilerVisitor.scala @@ -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 @@ -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 diff --git a/modules/core/src/main/scala/playground/ServiceIndex.scala b/modules/core/src/main/scala/playground/ServiceIndex.scala index 7074e0af..f3f54713 100644 --- a/modules/core/src/main/scala/playground/ServiceIndex.scala +++ b/modules/core/src/main/scala/playground/ServiceIndex.scala @@ -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 { diff --git a/modules/core/src/main/scala/playground/ServiceNameExtractor.scala b/modules/core/src/main/scala/playground/ServiceNameExtractor.scala index 43418105..d513e8ad 100644 --- a/modules/core/src/main/scala/playground/ServiceNameExtractor.scala +++ b/modules/core/src/main/scala/playground/ServiceNameExtractor.scala @@ -3,7 +3,7 @@ package playground import aws.api import playground.smithyql.QualifiedIdentifier import smithy4s.Service -import smithyql.syntax._ +import smithyql.syntax.* object ServiceNameExtractor { diff --git a/modules/core/src/main/scala/playground/smithyql/NodeContext.scala b/modules/core/src/main/scala/playground/smithyql/NodeContext.scala index d77f0274..47441ff0 100644 --- a/modules/core/src/main/scala/playground/smithyql/NodeContext.scala +++ b/modules/core/src/main/scala/playground/smithyql/NodeContext.scala @@ -2,7 +2,7 @@ package playground.smithyql import cats.data.Chain import cats.data.Chain.==: -import cats.implicits._ +import cats.syntax.all.* // The path to a position in the parsed source sealed trait NodeContext extends Product with Serializable with NodeContext.PathEntry.TraversalOps { @@ -10,7 +10,7 @@ sealed trait NodeContext extends Product with Serializable with NodeContext.Path def render: String = this match { case NodeContext.Impl(context) => - import NodeContext.PathEntry._ + import NodeContext.PathEntry.* context .map { diff --git a/modules/core/src/main/scala/playground/smithyql/RangeIndex.scala b/modules/core/src/main/scala/playground/smithyql/RangeIndex.scala index 7c750e77..b5401827 100644 --- a/modules/core/src/main/scala/playground/smithyql/RangeIndex.scala +++ b/modules/core/src/main/scala/playground/smithyql/RangeIndex.scala @@ -1,6 +1,6 @@ package playground.smithyql -import cats.implicits._ +import cats.syntax.all.* trait RangeIndex { diff --git a/modules/core/src/main/scala/playground/smithyql/syntax.scala b/modules/core/src/main/scala/playground/smithyql/syntax.scala index 24782e6f..86681df2 100644 --- a/modules/core/src/main/scala/playground/smithyql/syntax.scala +++ b/modules/core/src/main/scala/playground/smithyql/syntax.scala @@ -1,6 +1,6 @@ package playground.smithyql -import cats.implicits._ +import cats.syntax.all.* import playground.ServiceNameExtractor import smithy4s.Service import smithy4s.ShapeId diff --git a/modules/core/src/main/scala/playground/smithyutil/AddDynamicRefinements.scala b/modules/core/src/main/scala/playground/smithyutil/AddDynamicRefinements.scala index a91aecb0..dd922977 100644 --- a/modules/core/src/main/scala/playground/smithyutil/AddDynamicRefinements.scala +++ b/modules/core/src/main/scala/playground/smithyutil/AddDynamicRefinements.scala @@ -1,14 +1,14 @@ package playground.smithyutil -import cats.implicits._ +import cats.syntax.all.* import smithy.api import smithy4s.Refinement import smithy4s.RefinementProvider import smithy4s.Surjection -import smithy4s.schema.CollectionTag._ -import smithy4s.schema.Primitive._ +import smithy4s.schema.CollectionTag.* +import smithy4s.schema.Primitive.* import smithy4s.schema.Schema -import smithy4s.schema.Schema._ +import smithy4s.schema.Schema.* import smithy4s.~> /** Reifies refinement hints into the schema. diff --git a/modules/core/src/main/scala/playground/std/StdlibRuntime.scala b/modules/core/src/main/scala/playground/std/StdlibRuntime.scala index c59b2470..6e1c59eb 100644 --- a/modules/core/src/main/scala/playground/std/StdlibRuntime.scala +++ b/modules/core/src/main/scala/playground/std/StdlibRuntime.scala @@ -2,7 +2,7 @@ package playground.std import cats.Functor import cats.effect.std.UUIDGen -import cats.implicits._ +import cats.syntax.all.* import smithy4s.Timestamp trait StdlibRuntime[F[_]] { diff --git a/modules/core/src/test/scala/playground/Diffs.scala b/modules/core/src/test/scala/playground/Diffs.scala index da60e236..bdde6815 100644 --- a/modules/core/src/test/scala/playground/Diffs.scala +++ b/modules/core/src/test/scala/playground/Diffs.scala @@ -8,9 +8,9 @@ import smithy4s.Blob import scala.annotation.nowarn object Diffs { - import com.softwaremill.diffx._ - import com.softwaremill.diffx.cats._ - import com.softwaremill.diffx.generic.auto._ + import com.softwaremill.diffx.* + import com.softwaremill.diffx.cats.* + import com.softwaremill.diffx.generic.auto.* implicit val diffNodeContext: Diff[NodeContext] = Diff.derivedDiff implicit val diffContextRange: Diff[ContextRange] = Diff.derivedDiff diff --git a/modules/core/src/test/scala/playground/IorUtilsTests.scala b/modules/core/src/test/scala/playground/IorUtilsTests.scala index 1d1cb067..37e28cc9 100644 --- a/modules/core/src/test/scala/playground/IorUtilsTests.scala +++ b/modules/core/src/test/scala/playground/IorUtilsTests.scala @@ -1,8 +1,8 @@ package playground import cats.data.Ior -import cats.implicits._ -import weaver._ +import cats.syntax.all.* +import weaver.* object IorUtilsTests extends FunSuite { diff --git a/modules/core/src/test/scala/playground/MultiServiceResolverTests.scala b/modules/core/src/test/scala/playground/MultiServiceResolverTests.scala index 016ae2ab..9a04749a 100644 --- a/modules/core/src/test/scala/playground/MultiServiceResolverTests.scala +++ b/modules/core/src/test/scala/playground/MultiServiceResolverTests.scala @@ -1,20 +1,20 @@ package playground import cats.Id -import cats.implicits._ -import com.softwaremill.diffx.cats._ -import playground.Diffs._ -import playground.smithyql.Diffs._ +import cats.syntax.all.* +import com.softwaremill.diffx.cats.* +import playground.Diffs.* +import playground.smithyql.Diffs.* import playground.smithyql.OperationName import playground.smithyql.Prelude import playground.smithyql.QualifiedIdentifier import playground.smithyql.QueryOperationName import playground.smithyql.SourceRange -import playground.smithyql.StringRangeUtils._ +import playground.smithyql.StringRangeUtils.* import playground.smithyql.parser.SourceParser -import weaver._ +import weaver.* -import Assertions._ +import Assertions.* import ServiceIndex.ServiceMetadata object MultiServiceResolverTests extends FunSuite { diff --git a/modules/core/src/test/scala/playground/NodeEncoderTests.scala b/modules/core/src/test/scala/playground/NodeEncoderTests.scala index aa14e71f..960049ac 100644 --- a/modules/core/src/test/scala/playground/NodeEncoderTests.scala +++ b/modules/core/src/test/scala/playground/NodeEncoderTests.scala @@ -8,7 +8,7 @@ import demo.smithy.Power import demo.smithy.SampleSparseList import playground.NodeEncoder import playground.smithyql.AST -import playground.smithyql.DSL._ +import playground.smithyql.DSL.* import playground.smithyql.Listed import playground.smithyql.NullLiteral import playground.smithyql.StringLiteral @@ -17,7 +17,7 @@ import smithy4s.Blob import smithy4s.Document import smithy4s.Timestamp import smithy4s.schema.Schema -import weaver._ +import weaver.* object NodeEncoderTests extends FunSuite { diff --git a/modules/core/src/test/scala/playground/PreludeCompilerTests.scala b/modules/core/src/test/scala/playground/PreludeCompilerTests.scala index 4b0a7896..afc03679 100644 --- a/modules/core/src/test/scala/playground/PreludeCompilerTests.scala +++ b/modules/core/src/test/scala/playground/PreludeCompilerTests.scala @@ -4,17 +4,17 @@ import cats.Id import cats.data.Ior import cats.data.IorNel import cats.data.NonEmptyList -import cats.implicits._ -import com.softwaremill.diffx.cats._ +import cats.syntax.all.* +import com.softwaremill.diffx.cats.* import playground.smithyql.OperationName import playground.smithyql.Prelude import playground.smithyql.QualifiedIdentifier -import playground.smithyql.StringRangeUtils._ +import playground.smithyql.StringRangeUtils.* import playground.smithyql.parser.SourceParser -import weaver._ +import weaver.* -import Assertions._ -import Diffs._ +import Assertions.* +import Diffs.* object PreludeCompilerTests extends FunSuite { diff --git a/modules/core/src/test/scala/playground/ServiceNameExtractorTests.scala b/modules/core/src/test/scala/playground/ServiceNameExtractorTests.scala index a34db28e..a1c8b125 100644 --- a/modules/core/src/test/scala/playground/ServiceNameExtractorTests.scala +++ b/modules/core/src/test/scala/playground/ServiceNameExtractorTests.scala @@ -5,7 +5,7 @@ import demo.fake_aws.MyThing import demo.smithy.DemoServiceGen import playground.smithyql.QualifiedIdentifier import smithy4s.ShapeId -import weaver._ +import weaver.* object ServiceNameExtractorTests extends FunSuite { test("extract name of service with an AWS hint") { diff --git a/modules/core/src/test/scala/playground/smithyql/AtPositionTests.scala b/modules/core/src/test/scala/playground/smithyql/AtPositionTests.scala index ef34be43..ae77eb49 100644 --- a/modules/core/src/test/scala/playground/smithyql/AtPositionTests.scala +++ b/modules/core/src/test/scala/playground/smithyql/AtPositionTests.scala @@ -1,9 +1,9 @@ package playground.smithyql -import playground.Assertions._ -import playground.Diffs._ +import playground.Assertions.* +import playground.Diffs.* import playground.smithyql.parser.SourceParser -import weaver._ +import weaver.* object AtPositionTests extends FunSuite { diff --git a/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala b/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala index 3b7d5d4d..32842f3a 100644 --- a/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala +++ b/modules/core/src/test/scala/playground/smithyql/CompilationTests.scala @@ -6,9 +6,9 @@ import cats.data.Chain import cats.data.Ior import cats.data.NonEmptyChain import cats.data.NonEmptyList -import cats.implicits._ +import cats.syntax.all.* import com.softwaremill.diffx.Diff -import com.softwaremill.diffx.cats._ +import com.softwaremill.diffx.cats.* import demo.smithy.Bad import demo.smithy.DeprecatedServiceGen import demo.smithy.EnumStruct @@ -27,7 +27,7 @@ import demo.smithy.Power import demo.smithy.SampleSparseList import demo.smithy.StringWithLength import org.scalacheck.Arbitrary -import playground.Assertions._ +import playground.Assertions.* import playground.CompilationError import playground.CompilationErrorDetails import playground.CompilationFailed @@ -35,16 +35,16 @@ import playground.CompiledInput import playground.DeprecatedInfo import playground.DiagnosticSeverity import playground.DiagnosticTag -import playground.Diffs._ +import playground.Diffs.* import playground.DynamicModel import playground.OperationCompiler import playground.PreludeCompiler import playground.QueryCompiler import playground.QueryCompilerVisitor import playground.ServiceIndex -import playground.ServiceUtils._ +import playground.ServiceUtils.* import playground.smithyql.parser.SourceParser -import playground.smithyql.syntax._ +import playground.smithyql.syntax.* import playground.std.ClockGen import playground.std.RandomGen import playground.types.IorThrow @@ -58,18 +58,18 @@ import smithy4s.ShapeTag import smithy4s.Timestamp import smithy4s.dynamic.DynamicSchemaIndex import smithy4s.schema.Schema -import weaver._ +import weaver.* import weaver.scalacheck.Checkers import java.time import java.util.UUID -import Arbitraries._ -import StringRangeUtils._ +import Arbitraries.* +import StringRangeUtils.* object CompilationTests extends SimpleIOSuite with Checkers { - import DSL._ + import DSL.* private def compile[A: smithy4s.Schema]( in: QueryCompiler.WAST diff --git a/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala b/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala index 660664d9..de13b1af 100644 --- a/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala +++ b/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala @@ -3,8 +3,8 @@ package playground.e2e import buildinfo.BuildInfo import cats.effect.IO import cats.effect.kernel.Resource -import cats.effect.unsafe.implicits._ -import cats.implicits._ +import cats.effect.unsafe.implicits.* +import cats.syntax.all.* import fs2.io.file import org.eclipse.lsp4j.InitializeParams import org.eclipse.lsp4j.InitializeResult @@ -16,14 +16,14 @@ import org.eclipse.lsp4j.WorkspaceFolder import org.eclipse.lsp4j.launch.LSPLauncher import org.eclipse.lsp4j.services.LanguageServer import playground.lsp.PlaygroundLanguageClient -import weaver._ +import weaver.* import java.io.PrintWriter import java.lang.ProcessBuilder.Redirect import java.util.concurrent.CompletableFuture -import scala.concurrent.duration._ -import scala.jdk.CollectionConverters._ -import scala.util.chaining._ +import scala.concurrent.duration.* +import scala.jdk.CollectionConverters.* +import scala.util.chaining.* object E2ETests extends SimpleIOSuite { diff --git a/modules/formatter/src/main/scala/playground/smithyql/format/Formatter.scala b/modules/formatter/src/main/scala/playground/smithyql/format/Formatter.scala index 3a71f518..0cf1ae1f 100644 --- a/modules/formatter/src/main/scala/playground/smithyql/format/Formatter.scala +++ b/modules/formatter/src/main/scala/playground/smithyql/format/Formatter.scala @@ -1,9 +1,10 @@ package playground.smithyql.format -import cats.implicits._ +import cats.kernel.Order.catsKernelOrderingForOrder +import cats.syntax.all.* import org.typelevel.paiges.Doc -import org.typelevel.paiges.instances._ -import playground.smithyql._ +import org.typelevel.paiges.instances.* +import playground.smithyql.* trait Formatter[-Alg[_[_]]] { diff --git a/modules/formatter/src/test/scala/playground/smithyql/format/FormattingTests.scala b/modules/formatter/src/test/scala/playground/smithyql/format/FormattingTests.scala index 7c819b78..dc3156e2 100644 --- a/modules/formatter/src/test/scala/playground/smithyql/format/FormattingTests.scala +++ b/modules/formatter/src/test/scala/playground/smithyql/format/FormattingTests.scala @@ -1,17 +1,17 @@ package playground.smithyql.format -import cats.implicits._ -import playground.Assertions._ -import playground.smithyql._ +import cats.syntax.all.* +import playground.Assertions.* +import playground.smithyql.* import playground.smithyql.format.Formatter import playground.smithyql.parser.Examples import playground.smithyql.parser.ParserSuite import playground.smithyql.parser.SourceParser -import util.chaining._ -import weaver._ +import util.chaining.* +import weaver.* import weaver.scalacheck.Checkers -import Diffs._ +import Diffs.* object FormattingTests extends SimpleIOSuite with Checkers { diff --git a/modules/language-support/src/main/scala/playground/language/CodeLensProvider.scala b/modules/language-support/src/main/scala/playground/language/CodeLensProvider.scala index a9b28c89..d7d62c0b 100644 --- a/modules/language-support/src/main/scala/playground/language/CodeLensProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/CodeLensProvider.scala @@ -1,13 +1,13 @@ package playground.language -import cats.implicits._ +import cats.syntax.all.* import playground.FileCompiler import playground.FileRunner import playground.smithyql.SourceFile import playground.smithyql.SourceRange import playground.smithyql.WithSource import playground.smithyql.parser.SourceParser -import playground.types._ +import playground.types.* trait CodeLensProvider[F[_]] { diff --git a/modules/language-support/src/main/scala/playground/language/CommandProvider.scala b/modules/language-support/src/main/scala/playground/language/CommandProvider.scala index 06411661..2a2fc9ba 100644 --- a/modules/language-support/src/main/scala/playground/language/CommandProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/CommandProvider.scala @@ -3,7 +3,7 @@ package playground.language import cats.Id import cats.MonadThrow import cats.data.NonEmptyList -import cats.implicits._ +import cats.syntax.all.* import playground.CompilationFailed import playground.CompiledInput import playground.FileCompiler diff --git a/modules/language-support/src/main/scala/playground/language/CommandResultReporter.scala b/modules/language-support/src/main/scala/playground/language/CommandResultReporter.scala index 16afb7c4..88097436 100644 --- a/modules/language-support/src/main/scala/playground/language/CommandResultReporter.scala +++ b/modules/language-support/src/main/scala/playground/language/CommandResultReporter.scala @@ -4,7 +4,7 @@ import cats.Id import cats.Monad import cats.data.NonEmptyList import cats.effect.kernel.Ref -import cats.implicits._ +import cats.syntax.all.* import playground.CompiledInput import playground.smithyql.InputNode import playground.smithyql.Query diff --git a/modules/language-support/src/main/scala/playground/language/CompletionProvider.scala b/modules/language-support/src/main/scala/playground/language/CompletionProvider.scala index 8740b3d2..58c99f4e 100644 --- a/modules/language-support/src/main/scala/playground/language/CompletionProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/CompletionProvider.scala @@ -1,7 +1,8 @@ package playground.language import cats.Id -import cats.implicits._ +import cats.kernel.Order.catsKernelOrderingForOrder +import cats.syntax.all.* import playground.MultiServiceResolver import playground.ServiceIndex import playground.smithyql.NodeContext @@ -15,7 +16,7 @@ import playground.smithyql.RangeIndex import playground.smithyql.SourceFile import playground.smithyql.WithSource import playground.smithyql.parser.SourceParser -import playground.smithyql.syntax._ +import playground.smithyql.syntax.* import smithy4s.dynamic.DynamicSchemaIndex trait CompletionProvider { 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 2cf78414..6135a95c 100644 --- a/modules/language-support/src/main/scala/playground/language/CompletionVisitor.scala +++ b/modules/language-support/src/main/scala/playground/language/CompletionVisitor.scala @@ -1,8 +1,8 @@ package playground.language import cats.Id -import cats.implicits._ import cats.kernel.Eq +import cats.syntax.all.* import playground.ServiceNameExtractor import playground.TextUtils import playground.language.CompletionItem.InsertUseClause.NotRequired @@ -38,7 +38,7 @@ import smithy4s.schema.EnumValue import smithy4s.schema.Field import smithy4s.schema.Primitive import smithy4s.schema.Schema -import smithy4s.schema.Schema._ +import smithy4s.schema.Schema.* import smithy4s.schema.SchemaVisitor import java.util.UUID @@ -205,7 +205,7 @@ object CompletionItem { ): Boolean = schema.hints.has(smithy.api.Required) private val describePrimitive: Primitive[_] => String = { - import smithy4s.schema.Primitive._ + import smithy4s.schema.Primitive.* { case PString => "string" @@ -229,7 +229,7 @@ object CompletionItem { tag: CollectionTag[C], hints: Hints, ): String = { - import smithy4s.schema.CollectionTag._ + import smithy4s.schema.CollectionTag.* val base = tag match { diff --git a/modules/language-support/src/main/scala/playground/language/DiagnosticProvider.scala b/modules/language-support/src/main/scala/playground/language/DiagnosticProvider.scala index 3793adaf..85ee13ae 100644 --- a/modules/language-support/src/main/scala/playground/language/DiagnosticProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/DiagnosticProvider.scala @@ -3,7 +3,7 @@ package playground.language import cats.data.Ior import cats.data.IorNel import cats.data.NonEmptyList -import cats.implicits._ +import cats.syntax.all.* import playground.CompilationError import playground.CompilationErrorDetails import playground.CompilationFailed @@ -17,7 +17,7 @@ import playground.smithyql.SourceRange import playground.smithyql.WithSource import playground.smithyql.parser.ParsingFailure import playground.smithyql.parser.SourceParser -import playground.types._ +import playground.types.* trait DiagnosticProvider[F[_]] { diff --git a/modules/language-support/src/main/scala/playground/language/DocumentSymbolProvider.scala b/modules/language-support/src/main/scala/playground/language/DocumentSymbolProvider.scala index f25d4e48..57d8c7b3 100644 --- a/modules/language-support/src/main/scala/playground/language/DocumentSymbolProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/DocumentSymbolProvider.scala @@ -1,6 +1,6 @@ package playground.language -import cats.implicits._ +import cats.syntax.all.* import playground.smithyql.InputNode import playground.smithyql.Listed import playground.smithyql.Prelude diff --git a/modules/language-support/src/main/scala/playground/language/FormattingProvider.scala b/modules/language-support/src/main/scala/playground/language/FormattingProvider.scala index 893267cd..154a20c3 100644 --- a/modules/language-support/src/main/scala/playground/language/FormattingProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/FormattingProvider.scala @@ -1,7 +1,7 @@ package playground.language import cats.FlatMap -import cats.implicits._ +import cats.syntax.all.* import playground.smithyql.SourceFile import playground.smithyql.SourceRange import playground.smithyql.format.Formatter diff --git a/modules/language-support/src/main/scala/playground/language/TextDocumentProvider.scala b/modules/language-support/src/main/scala/playground/language/TextDocumentProvider.scala index 4d103721..655061b1 100644 --- a/modules/language-support/src/main/scala/playground/language/TextDocumentProvider.scala +++ b/modules/language-support/src/main/scala/playground/language/TextDocumentProvider.scala @@ -1,7 +1,7 @@ package playground.language import cats.Applicative -import cats.implicits._ +import cats.syntax.all.* trait TextDocumentProvider[F[_]] { diff --git a/modules/language-support/src/test/scala/playground/language/CodeLensProviderTests.scala b/modules/language-support/src/test/scala/playground/language/CodeLensProviderTests.scala index e60c3970..9d62b88b 100644 --- a/modules/language-support/src/test/scala/playground/language/CodeLensProviderTests.scala +++ b/modules/language-support/src/test/scala/playground/language/CodeLensProviderTests.scala @@ -1,8 +1,8 @@ package playground.language import cats.effect.IO -import cats.implicits._ -import playground.Assertions._ +import cats.syntax.all.* +import playground.Assertions.* import playground.CompilationError import playground.CompilationFailed import playground.FileCompiler @@ -11,11 +11,11 @@ import playground.OperationCompiler import playground.OperationRunner import playground.PreludeCompiler import playground.ServiceIndex -import playground.ServiceUtils._ -import playground.language.Diffs._ -import playground.smithyql.StringRangeUtils._ +import playground.ServiceUtils.* +import playground.language.Diffs.* +import playground.smithyql.StringRangeUtils.* import playground.std.RandomGen -import weaver._ +import weaver.* object CodeLensProviderTests extends FunSuite { diff --git a/modules/language-support/src/test/scala/playground/language/CompletionItemTests.scala b/modules/language-support/src/test/scala/playground/language/CompletionItemTests.scala index bd40a413..9a3c443f 100644 --- a/modules/language-support/src/test/scala/playground/language/CompletionItemTests.scala +++ b/modules/language-support/src/test/scala/playground/language/CompletionItemTests.scala @@ -2,16 +2,16 @@ package playground.language import demo.smithy.Hero import demo.smithy.Subscription -import playground.Assertions._ +import playground.Assertions.* import playground.smithyql.Position import playground.smithyql.QualifiedIdentifier -import playground.smithyql.syntax._ +import playground.smithyql.syntax.* import playground.std.ClockGen import playground.std.ClockOperation import smithy4s.schema.Schema -import weaver._ +import weaver.* -import Diffs._ +import Diffs.* object CompletionItemTests extends FunSuite { test("CompletionItem.fromField: required field") { diff --git a/modules/language-support/src/test/scala/playground/language/CompletionProviderTests.scala b/modules/language-support/src/test/scala/playground/language/CompletionProviderTests.scala index 53c4fdc7..2fc87e5e 100644 --- a/modules/language-support/src/test/scala/playground/language/CompletionProviderTests.scala +++ b/modules/language-support/src/test/scala/playground/language/CompletionProviderTests.scala @@ -2,18 +2,18 @@ package playground.language import demo.smithy.DemoServiceGen import demo.smithy.DeprecatedServiceGen -import playground.Assertions._ -import playground.ServiceUtils._ -import playground.language.Diffs._ +import playground.Assertions.* +import playground.ServiceUtils.* +import playground.language.Diffs.* import playground.smithyql.Position import playground.smithyql.QualifiedIdentifier -import playground.smithyql.StringRangeUtils._ -import playground.smithyql.syntax._ +import playground.smithyql.StringRangeUtils.* +import playground.smithyql.syntax.* import playground.std.ClockGen import playground.std.ClockOperation import playground.std.RandomGen import playground.std.RandomOperation -import weaver._ +import weaver.* object CompletionProviderTests extends SimpleIOSuite { 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 dedb1ee5..aca98573 100644 --- a/modules/language-support/src/test/scala/playground/language/CompletionTests.scala +++ b/modules/language-support/src/test/scala/playground/language/CompletionTests.scala @@ -1,6 +1,6 @@ package playground.language -import cats.implicits._ +import cats.syntax.all.* import demo.smithy.Good import demo.smithy.HasDeprecations import demo.smithy.HasNewtypes @@ -15,15 +15,15 @@ import demo.smithy.PowerMap import demo.smithy.PrivacyTier import demo.smithy.SampleSparseList import demo.smithy.SampleSparseMap -import playground.Assertions._ -import playground.language.Diffs._ +import playground.Assertions.* +import playground.language.Diffs.* import playground.smithyql.NodeContext -import playground.smithyql.NodeContext.PathEntry._ +import playground.smithyql.NodeContext.PathEntry.* import smithy.api.TimestampFormat import smithy4s.Hints import smithy4s.Timestamp import smithy4s.schema.Schema -import weaver._ +import weaver.* import java.util.UUID diff --git a/modules/language-support/src/test/scala/playground/language/DiagnosticProviderTests.scala b/modules/language-support/src/test/scala/playground/language/DiagnosticProviderTests.scala index d3e791f2..f8d6236c 100644 --- a/modules/language-support/src/test/scala/playground/language/DiagnosticProviderTests.scala +++ b/modules/language-support/src/test/scala/playground/language/DiagnosticProviderTests.scala @@ -14,29 +14,29 @@ import demo.smithy.DemoServiceGen import noop.NoRunnerServiceGen import org.http4s.HttpApp import org.http4s.client.Client -import playground.Assertions._ +import playground.Assertions.* import playground.CompilationError import playground.CompilationErrorDetails import playground.CompilationFailed import playground.DiagnosticSeverity -import playground.Diffs._ +import playground.Diffs.* import playground.FileCompiler import playground.FileRunner import playground.OperationCompiler import playground.OperationRunner import playground.PreludeCompiler import playground.ServiceIndex -import playground.ServiceUtils._ +import playground.ServiceUtils.* import playground.smithyql.QualifiedIdentifier import playground.smithyql.SourceRange -import playground.smithyql.StringRangeUtils._ +import playground.smithyql.StringRangeUtils.* import playground.std.ClockGen import playground.std.RandomGen import playground.std.Stdlib import playground.std.StdlibRuntime import smithy4s.HasId import smithy4s.aws.AwsEnvironment -import weaver._ +import weaver.* object DiagnosticProviderTests extends SimpleIOSuite { diff --git a/modules/language-support/src/test/scala/playground/language/Diffs.scala b/modules/language-support/src/test/scala/playground/language/Diffs.scala index a06d1cec..bf5421fb 100644 --- a/modules/language-support/src/test/scala/playground/language/Diffs.scala +++ b/modules/language-support/src/test/scala/playground/language/Diffs.scala @@ -3,7 +3,7 @@ package playground.language import com.softwaremill.diffx.Diff object Diffs { - import com.softwaremill.diffx.generic.auto._ + import com.softwaremill.diffx.generic.auto.* implicit val diffCompletionItem: Diff[CompletionItem] = Diff.derivedDiff implicit lazy val diffDocumentSymbol: Diff[DocumentSymbol] = Diff.derivedDiff implicit lazy val diffCodeLens: Diff[CodeLens] = Diff.derivedDiff diff --git a/modules/language-support/src/test/scala/playground/language/DocumentSymbolProviderTests.scala b/modules/language-support/src/test/scala/playground/language/DocumentSymbolProviderTests.scala index 08868c1b..213f7209 100644 --- a/modules/language-support/src/test/scala/playground/language/DocumentSymbolProviderTests.scala +++ b/modules/language-support/src/test/scala/playground/language/DocumentSymbolProviderTests.scala @@ -1,10 +1,10 @@ package playground.language -import playground.Assertions._ -import playground.language.Diffs._ +import playground.Assertions.* +import playground.language.Diffs.* import playground.smithyql.Position import playground.smithyql.SourceRange -import weaver._ +import weaver.* object DocumentSymbolProviderTests extends FunSuite { diff --git a/modules/language-support/src/test/scala/playground/language/FormattingProviderTests.scala b/modules/language-support/src/test/scala/playground/language/FormattingProviderTests.scala index fcbd4b46..5e2c0d47 100644 --- a/modules/language-support/src/test/scala/playground/language/FormattingProviderTests.scala +++ b/modules/language-support/src/test/scala/playground/language/FormattingProviderTests.scala @@ -1,11 +1,10 @@ package playground.language import cats.Id -import cats.implicits._ import fs2.io.file.Path import playground.smithyql.Position import playground.smithyql.SourceRange -import weaver._ +import weaver.* object FormattingProviderTests extends FunSuite { private val anyUri = Uri.fromPath(Path("file.smithyql")) diff --git a/modules/lsp/src/main/scala/playground/lsp/BuildLoader.scala b/modules/lsp/src/main/scala/playground/lsp/BuildLoader.scala index e58f8f65..b69bf8ee 100644 --- a/modules/lsp/src/main/scala/playground/lsp/BuildLoader.scala +++ b/modules/lsp/src/main/scala/playground/lsp/BuildLoader.scala @@ -1,7 +1,7 @@ package playground.lsp import cats.effect.kernel.Sync -import cats.implicits._ +import cats.syntax.all.* import fs2.io.file.Files import fs2.io.file.Path import playground.PlaygroundConfig diff --git a/modules/lsp/src/main/scala/playground/lsp/ConfigurationValue.scala b/modules/lsp/src/main/scala/playground/lsp/ConfigurationValue.scala index 810455b1..880cd73b 100644 --- a/modules/lsp/src/main/scala/playground/lsp/ConfigurationValue.scala +++ b/modules/lsp/src/main/scala/playground/lsp/ConfigurationValue.scala @@ -1,6 +1,6 @@ package playground.lsp -import cats.implicits._ +import cats.syntax.all.* import io.circe.Codec import io.circe.Decoder import io.circe.Encoder diff --git a/modules/lsp/src/main/scala/playground/lsp/LanguageClient.scala b/modules/lsp/src/main/scala/playground/lsp/LanguageClient.scala index 06a86299..8d77a1bf 100644 --- a/modules/lsp/src/main/scala/playground/lsp/LanguageClient.scala +++ b/modules/lsp/src/main/scala/playground/lsp/LanguageClient.scala @@ -2,7 +2,7 @@ package playground.lsp import cats.FlatMap import cats.effect.kernel.Async -import cats.implicits._ +import cats.syntax.all.* import com.google.gson.JsonElement import org.eclipse.lsp4j.ConfigurationItem import org.eclipse.lsp4j.ConfigurationParams @@ -11,8 +11,8 @@ import org.eclipse.lsp4j.MessageType import playground.language.Feedback import java.util.concurrent.CompletableFuture -import scala.jdk.CollectionConverters._ -import scala.util.chaining._ +import scala.jdk.CollectionConverters.* +import scala.util.chaining.* trait LanguageClient[F[_]] extends Feedback[F] { diff --git a/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala b/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala index ce967389..98931e6f 100644 --- a/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala +++ b/modules/lsp/src/main/scala/playground/lsp/LanguageServer.scala @@ -4,14 +4,14 @@ import cats.Applicative import cats.FlatMap import cats.MonadThrow import cats.effect.kernel.Async -import cats.implicits._ import cats.parse.LocationMap +import cats.syntax.all.* import cats.~> import com.google.gson.JsonElement import com.google.gson.JsonPrimitive +import org.eclipse.lsp4j.* import org.eclipse.lsp4j.ServerCapabilities import org.eclipse.lsp4j.TextDocumentSyncKind -import org.eclipse.lsp4j._ import playground.CompilationError import playground.CompilationFailed import playground.FileCompiler @@ -31,13 +31,13 @@ import playground.language.FormattingProvider import playground.language.TextDocumentProvider import playground.language.Uri import playground.lsp.buildinfo.BuildInfo -import playground.types._ +import playground.types.* import smithy4s.dynamic.DynamicSchemaIndex -import scala.jdk.CollectionConverters._ -import scala.util.chaining._ +import scala.jdk.CollectionConverters.* +import scala.util.chaining.* -import ToUriOps._ +import ToUriOps.* trait LanguageServer[F[_]] { diff --git a/modules/lsp/src/main/scala/playground/lsp/Main.scala b/modules/lsp/src/main/scala/playground/lsp/Main.scala index d7c98024..78df39f5 100644 --- a/modules/lsp/src/main/scala/playground/lsp/Main.scala +++ b/modules/lsp/src/main/scala/playground/lsp/Main.scala @@ -5,7 +5,7 @@ import cats.effect.IOApp import cats.effect.kernel.Deferred import cats.effect.kernel.Resource import cats.effect.std.Dispatcher -import cats.implicits._ +import cats.syntax.all.* import org.eclipse.lsp4j.jsonrpc.Launcher import org.eclipse.lsp4j.launch.LSPLauncher diff --git a/modules/lsp/src/main/scala/playground/lsp/MainServer.scala b/modules/lsp/src/main/scala/playground/lsp/MainServer.scala index a122d857..dc9bac1d 100644 --- a/modules/lsp/src/main/scala/playground/lsp/MainServer.scala +++ b/modules/lsp/src/main/scala/playground/lsp/MainServer.scala @@ -1,6 +1,6 @@ package playground.lsp -import cats.effect.implicits._ +import cats.effect.implicits.* import cats.effect.kernel.Async import cats.effect.kernel.Resource import cats.effect.std diff --git a/modules/lsp/src/main/scala/playground/lsp/ModelLoader.scala b/modules/lsp/src/main/scala/playground/lsp/ModelLoader.scala index e8946bdc..6793316e 100644 --- a/modules/lsp/src/main/scala/playground/lsp/ModelLoader.scala +++ b/modules/lsp/src/main/scala/playground/lsp/ModelLoader.scala @@ -1,6 +1,6 @@ package playground.lsp -import coursier._ +import coursier.* import coursier.cache.FileCache import coursier.parse.DependencyParser import coursier.parse.RepositoryParser @@ -17,10 +17,10 @@ import java.net.URL import java.net.URLClassLoader import java.nio.file.FileSystems import java.nio.file.Files -import scala.concurrent.duration._ -import scala.jdk.CollectionConverters._ +import scala.concurrent.duration.* +import scala.jdk.CollectionConverters.* import scala.util.Using -import scala.util.chaining._ +import scala.util.chaining.* // NOTE: methods in this object are mostly side effecting and blocking. object ModelLoader { diff --git a/modules/lsp/src/main/scala/playground/lsp/PlaygroundLanguageServerAdapter.scala b/modules/lsp/src/main/scala/playground/lsp/PlaygroundLanguageServerAdapter.scala index 9c7f4b3c..2c2c68f9 100644 --- a/modules/lsp/src/main/scala/playground/lsp/PlaygroundLanguageServerAdapter.scala +++ b/modules/lsp/src/main/scala/playground/lsp/PlaygroundLanguageServerAdapter.scala @@ -2,8 +2,8 @@ package playground.lsp import cats.Functor import cats.effect.std.Dispatcher -import cats.implicits._ -import org.eclipse.lsp4j._ +import cats.syntax.all.* +import org.eclipse.lsp4j.* import org.eclipse.lsp4j.adapters.DocumentSymbolResponseAdapter import org.eclipse.lsp4j.jsonrpc.json.ResponseJsonAdapter import org.eclipse.lsp4j.jsonrpc.messages @@ -11,7 +11,7 @@ import org.eclipse.lsp4j.jsonrpc.services.JsonNotification import org.eclipse.lsp4j.jsonrpc.services.JsonRequest import java.util.concurrent.CompletableFuture -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* final class PlaygroundLanguageServerAdapter[F[_]: Functor]( impl: LanguageServer[F] diff --git a/modules/lsp/src/main/scala/playground/lsp/PluginResolver.scala b/modules/lsp/src/main/scala/playground/lsp/PluginResolver.scala index ea252816..5a171fb3 100644 --- a/modules/lsp/src/main/scala/playground/lsp/PluginResolver.scala +++ b/modules/lsp/src/main/scala/playground/lsp/PluginResolver.scala @@ -1,7 +1,7 @@ package playground.lsp import cats.effect.kernel.Sync -import cats.implicits._ +import cats.syntax.all.* import playground.PlaygroundConfig import playground.plugins.PlaygroundPlugin diff --git a/modules/lsp/src/main/scala/playground/lsp/ServerBuilder.scala b/modules/lsp/src/main/scala/playground/lsp/ServerBuilder.scala index 914a15ae..b7a4f935 100644 --- a/modules/lsp/src/main/scala/playground/lsp/ServerBuilder.scala +++ b/modules/lsp/src/main/scala/playground/lsp/ServerBuilder.scala @@ -1,10 +1,10 @@ package playground.lsp -import cats.effect.implicits._ +import cats.effect.implicits.* import cats.effect.kernel.Async import cats.effect.kernel.Resource import cats.effect.std -import cats.implicits._ +import cats.syntax.all.* import fs2.compression.Compression import fs2.io.file.Files import fs2.io.net.Network diff --git a/modules/lsp/src/main/scala/playground/lsp/ServerLoader.scala b/modules/lsp/src/main/scala/playground/lsp/ServerLoader.scala index b51a62da..97fabd41 100644 --- a/modules/lsp/src/main/scala/playground/lsp/ServerLoader.scala +++ b/modules/lsp/src/main/scala/playground/lsp/ServerLoader.scala @@ -2,7 +2,7 @@ package playground.lsp import cats.MonadThrow import cats.effect.kernel.Ref -import cats.implicits._ +import cats.syntax.all.* import playground.PlaygroundConfig import playground.language.Uri diff --git a/modules/lsp/src/main/scala/playground/lsp/TextDocumentManager.scala b/modules/lsp/src/main/scala/playground/lsp/TextDocumentManager.scala index 10e4f0b6..66b14d14 100644 --- a/modules/lsp/src/main/scala/playground/lsp/TextDocumentManager.scala +++ b/modules/lsp/src/main/scala/playground/lsp/TextDocumentManager.scala @@ -3,7 +3,7 @@ package playground import cats.data.OptionT import cats.effect.Concurrent import cats.effect.kernel.Ref -import cats.implicits._ +import cats.syntax.all.* import fs2.io.file.Files import playground.language.TextDocumentProvider import playground.language.Uri diff --git a/modules/lsp/src/main/scala/playground/lsp/converters.scala b/modules/lsp/src/main/scala/playground/lsp/converters.scala index fad723f6..93bde8d6 100644 --- a/modules/lsp/src/main/scala/playground/lsp/converters.scala +++ b/modules/lsp/src/main/scala/playground/lsp/converters.scala @@ -1,7 +1,7 @@ package playground.lsp -import cats.implicits._ import cats.parse.LocationMap +import cats.syntax.all.* import com.google.gson.JsonElement import io.circe.Json import io.circe.JsonNumber @@ -19,8 +19,8 @@ import playground.language.TextEdit import playground.smithyql.Position import playground.smithyql.SourceRange -import scala.jdk.CollectionConverters._ -import scala.util.chaining._ +import scala.jdk.CollectionConverters.* +import scala.util.chaining.* object converters { diff --git a/modules/lsp/src/main/scala/playground/lsp/util/KleisliOps.scala b/modules/lsp/src/main/scala/playground/lsp/util/KleisliOps.scala index fef2b7a0..a9e85393 100644 --- a/modules/lsp/src/main/scala/playground/lsp/util/KleisliOps.scala +++ b/modules/lsp/src/main/scala/playground/lsp/util/KleisliOps.scala @@ -2,7 +2,7 @@ package playground.lsp.util import cats.FlatMap import cats.data.Kleisli -import cats.implicits._ +import cats.syntax.all.* import cats.~> object KleisliOps { diff --git a/modules/lsp/src/test/scala/playground/lsp/EmptyConfigTests.scala b/modules/lsp/src/test/scala/playground/lsp/EmptyConfigTests.scala index eb04a45f..e791ad6b 100644 --- a/modules/lsp/src/test/scala/playground/lsp/EmptyConfigTests.scala +++ b/modules/lsp/src/test/scala/playground/lsp/EmptyConfigTests.scala @@ -6,7 +6,7 @@ import org.eclipse.lsp4j.DidChangeWatchedFilesParams import org.eclipse.lsp4j.MessageType import playground.lsp.harness.LanguageServerIntegrationTests import playground.lsp.harness.TestClient -import weaver._ +import weaver.* object EmptyConfigTests extends IOSuite with LanguageServerIntegrationTests { diff --git a/modules/lsp/src/test/scala/playground/lsp/LanguageServerIntegrationTestSharedServer.scala b/modules/lsp/src/test/scala/playground/lsp/LanguageServerIntegrationTestSharedServer.scala index b0f4a819..bb0e2e60 100644 --- a/modules/lsp/src/test/scala/playground/lsp/LanguageServerIntegrationTestSharedServer.scala +++ b/modules/lsp/src/test/scala/playground/lsp/LanguageServerIntegrationTestSharedServer.scala @@ -2,7 +2,7 @@ package playground.lsp import cats.effect.IO import cats.effect.Resource -import com.comcast.ip4s._ +import com.comcast.ip4s.* import org.eclipse.lsp4j.CodeLensParams import org.eclipse.lsp4j.Command import org.eclipse.lsp4j.CompletionParams @@ -14,16 +14,16 @@ import org.eclipse.lsp4j.Position import org.eclipse.lsp4j.TextDocumentIdentifier import org.http4s.HttpRoutes import org.http4s.ember.server.EmberServerBuilder -import org.http4s.implicits._ +import org.http4s.implicits.* import org.http4s.server.Server import playground.language.Uri import playground.lsp.buildinfo.BuildInfo import playground.lsp.harness.LanguageServerIntegrationTests import playground.lsp.harness.TestClient -import weaver._ +import weaver.* -import scala.concurrent.duration._ -import scala.jdk.CollectionConverters._ +import scala.concurrent.duration.* +import scala.jdk.CollectionConverters.* object LanguageServerIntegrationTestSharedServer extends IOSuite @@ -250,7 +250,7 @@ object LanguageServerIntegrationTestSharedServer .withPort(port"0") .withShutdownTimeout(Duration.Zero) .withHttpApp { - import org.http4s.dsl.io._ + import org.http4s.dsl.io.* HttpRoutes .of[IO] { case GET -> Root / "weather" / _ => Ok( diff --git a/modules/lsp/src/test/scala/playground/lsp/LanguageServerReloadIntegrationTests.scala b/modules/lsp/src/test/scala/playground/lsp/LanguageServerReloadIntegrationTests.scala index 5d5c59a0..6fb3d8d5 100644 --- a/modules/lsp/src/test/scala/playground/lsp/LanguageServerReloadIntegrationTests.scala +++ b/modules/lsp/src/test/scala/playground/lsp/LanguageServerReloadIntegrationTests.scala @@ -1,7 +1,7 @@ package playground.lsp import cats.effect.IO -import cats.implicits._ +import cats.syntax.all.* import fs2.io.file.Files import fs2.io.file.Path import org.eclipse.lsp4j.CodeLensParams @@ -13,9 +13,9 @@ import playground.PlaygroundConfig import playground.language.Uri import playground.lsp.harness.LanguageServerIntegrationTests import playground.lsp.harness.TestClient.MessageLog -import weaver._ +import weaver.* -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* object LanguageServerReloadIntegrationTests extends SimpleIOSuite diff --git a/modules/lsp/src/test/scala/playground/lsp/ModelLoaderTests.scala b/modules/lsp/src/test/scala/playground/lsp/ModelLoaderTests.scala index 1c0e9592..91c841c0 100644 --- a/modules/lsp/src/test/scala/playground/lsp/ModelLoaderTests.scala +++ b/modules/lsp/src/test/scala/playground/lsp/ModelLoaderTests.scala @@ -2,11 +2,11 @@ package playground.lsp import playground.PlaygroundConfig import software.amazon.smithy.model.shapes.ShapeId -import weaver._ +import weaver.* import java.util.stream.Collectors -import scala.jdk.CollectionConverters._ -import scala.jdk.OptionConverters._ +import scala.jdk.CollectionConverters.* +import scala.jdk.OptionConverters.* object ModelLoaderTests extends FunSuite { diff --git a/modules/lsp/src/test/scala/playground/lsp/PluginResolverTests.scala b/modules/lsp/src/test/scala/playground/lsp/PluginResolverTests.scala index 50a704f6..bc05b045 100644 --- a/modules/lsp/src/test/scala/playground/lsp/PluginResolverTests.scala +++ b/modules/lsp/src/test/scala/playground/lsp/PluginResolverTests.scala @@ -2,7 +2,7 @@ package playground.lsp import cats.effect.IO import playground.PlaygroundConfig -import weaver._ +import weaver.* object PluginResolverTests extends SimpleIOSuite { test("Empty plugin resolver finds no plugins") { 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 6a898c2d..a7922192 100644 --- a/modules/lsp/src/test/scala/playground/lsp/harness/LanguageServerIntegrationTests.scala +++ b/modules/lsp/src/test/scala/playground/lsp/harness/LanguageServerIntegrationTests.scala @@ -8,8 +8,8 @@ import playground.language.Uri import playground.lsp.LanguageServer import playground.lsp.MainServer -import scala.jdk.CollectionConverters._ -import scala.util.chaining._ +import scala.jdk.CollectionConverters.* +import scala.util.chaining.* trait LanguageServerIntegrationTests { diff --git a/modules/lsp/src/test/scala/playground/lsp/harness/TestClient.scala b/modules/lsp/src/test/scala/playground/lsp/harness/TestClient.scala index 12a26d6b..d2831105 100644 --- a/modules/lsp/src/test/scala/playground/lsp/harness/TestClient.scala +++ b/modules/lsp/src/test/scala/playground/lsp/harness/TestClient.scala @@ -3,7 +3,7 @@ package playground.lsp.harness import cats.data.Chain import cats.effect.IO import cats.effect.IOLocal -import cats.implicits._ +import cats.syntax.all.* import cats.~> import io.circe.Json import org.eclipse.lsp4j.MessageType diff --git a/modules/parser/src/main/scala/playground/smithyql/parser/Parsers.scala b/modules/parser/src/main/scala/playground/smithyql/parser/Parsers.scala index fd3643c7..e6305336 100644 --- a/modules/parser/src/main/scala/playground/smithyql/parser/Parsers.scala +++ b/modules/parser/src/main/scala/playground/smithyql/parser/Parsers.scala @@ -1,19 +1,19 @@ package playground.smithyql.parser import cats.Defer -import cats.implicits._ import cats.parse.Numbers import cats.parse.Parser import cats.parse.Parser0 import cats.parse.Rfc5234 -import playground.smithyql._ +import cats.syntax.all.* +import playground.smithyql.* object Parsers { type T[+A] = WithSource[A] object tokens { - import Parser._ + import Parser.* val newline: Parser[Unit] = Rfc5234.lf val comment: Parser[Comment] = @@ -155,7 +155,7 @@ object Parsers { object parsers { - import Parser._ + import Parser.* val rawIdent: Parser[String] = tokens.identifier val ident: Parser[T[String]] = tokens.withComments(tokens.identifier) diff --git a/modules/parser/src/main/scala/playground/smithyql/parser/SourceParser.scala b/modules/parser/src/main/scala/playground/smithyql/parser/SourceParser.scala index 7e7d99c2..4ef6a887 100644 --- a/modules/parser/src/main/scala/playground/smithyql/parser/SourceParser.scala +++ b/modules/parser/src/main/scala/playground/smithyql/parser/SourceParser.scala @@ -1,6 +1,5 @@ package playground.smithyql.parser -import cats.implicits._ import cats.kernel.Eq import cats.parse.Parser import cats.parse.Parser.Expectation.EndOfString @@ -8,7 +7,8 @@ import cats.parse.Parser.Expectation.InRange import cats.parse.Parser.Expectation.OneOfStr import cats.parse.Parser.Expectation.WithContext import cats.parse.Parser0 -import playground.smithyql._ +import cats.syntax.all.* +import playground.smithyql.* trait SourceParser[Alg[_[_]]] { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/Codecs.scala b/modules/parser/src/test/scala/playground/smithyql/parser/Codecs.scala index 06cdffb8..412c1976 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/Codecs.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/Codecs.scala @@ -11,8 +11,8 @@ import playground.smithyql.WithSource object Codecs { - import io.circe.generic.auto._ - import io.circe.generic.semiauto._ + import io.circe.generic.auto.* + import io.circe.generic.semiauto.* implicit val useClauseWithSourceCodec: Codec[UseClause[WithSource]] = deriveCodec diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/CommentParsingTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/CommentParsingTests.scala index 97ef3ec1..638fadcf 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/CommentParsingTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/CommentParsingTests.scala @@ -3,7 +3,7 @@ package playground.smithyql.parser import playground.smithyql.Comment import playground.smithyql.SourceFile import playground.smithyql.WithSource -import weaver._ +import weaver.* object CommentParsingTests extends SimpleIOSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/Diffs.scala b/modules/parser/src/test/scala/playground/smithyql/parser/Diffs.scala index 090a1e9a..15c7f4b9 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/Diffs.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/Diffs.scala @@ -3,7 +3,7 @@ package playground.smithyql.parser import com.softwaremill.diffx.Diff object Diffs { - import com.softwaremill.diffx.generic.auto._ + import com.softwaremill.diffx.generic.auto.* implicit val diffParsingFailure: Diff[ParsingFailure] = Diff.derivedDiff } diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/ParserSuite.scala b/modules/parser/src/test/scala/playground/smithyql/parser/ParserSuite.scala index 8e65bfc8..c9f1ef87 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/ParserSuite.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/ParserSuite.scala @@ -1,18 +1,18 @@ package playground.smithyql.parser import cats.effect.IO -import cats.implicits._ +import cats.syntax.all.* import com.softwaremill.diffx.Diff import fs2.io.file.Files import fs2.io.file.Path import io.circe.Codec import io.circe.Decoder -import io.circe.syntax._ -import playground.Assertions._ -import playground.smithyql._ +import io.circe.syntax.* +import playground.Assertions.* +import playground.smithyql.* import playground.smithyql.parser.v2.scanner.Scanner import playground.smithyql.parser.v2.scanner.TokenKind -import weaver._ +import weaver.* import java.nio.file import java.nio.file.NoSuchFileException diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/generative/ListParserTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/generative/ListParserTests.scala index bbb62af6..2c569430 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/generative/ListParserTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/generative/ListParserTests.scala @@ -1,8 +1,8 @@ package playground.smithyql.parser.generative -import playground.smithyql.Diffs._ -import playground.smithyql._ -import playground.smithyql.parser.Codecs._ +import playground.smithyql.* +import playground.smithyql.Diffs.* +import playground.smithyql.parser.Codecs.* import playground.smithyql.parser.ParserSuite object ListParserTests extends ParserSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/generative/PreludeParserTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/generative/PreludeParserTests.scala index c34b5e54..34ce313d 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/generative/PreludeParserTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/generative/PreludeParserTests.scala @@ -1,8 +1,8 @@ package playground.smithyql.parser.generative -import playground.smithyql.Diffs._ -import playground.smithyql._ -import playground.smithyql.parser.Codecs._ +import playground.smithyql.* +import playground.smithyql.Diffs.* +import playground.smithyql.parser.Codecs.* import playground.smithyql.parser.ParserSuite object PreludeParserTests extends ParserSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/generative/QueryParserTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/generative/QueryParserTests.scala index 9b82eae4..fe08713f 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/generative/QueryParserTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/generative/QueryParserTests.scala @@ -1,8 +1,8 @@ package playground.smithyql.parser.generative -import playground.smithyql.Diffs._ -import playground.smithyql._ -import playground.smithyql.parser.Codecs._ +import playground.smithyql.* +import playground.smithyql.Diffs.* +import playground.smithyql.parser.Codecs.* import playground.smithyql.parser.ParserSuite object QueryParserTests extends ParserSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/generative/SourceFileParserTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/generative/SourceFileParserTests.scala index 6bb5190e..5d6ad8a1 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/generative/SourceFileParserTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/generative/SourceFileParserTests.scala @@ -1,8 +1,8 @@ package playground.smithyql.parser.generative -import playground.smithyql.Diffs._ -import playground.smithyql._ -import playground.smithyql.parser.Codecs._ +import playground.smithyql.* +import playground.smithyql.Diffs.* +import playground.smithyql.parser.Codecs.* import playground.smithyql.parser.ParserSuite object SourceFileParserTests extends ParserSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/generative/StructParserTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/generative/StructParserTests.scala index a9ba9005..011c0cc4 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/generative/StructParserTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/generative/StructParserTests.scala @@ -1,8 +1,8 @@ package playground.smithyql.parser.generative -import playground.smithyql.Diffs._ -import playground.smithyql._ -import playground.smithyql.parser.Codecs._ +import playground.smithyql.* +import playground.smithyql.Diffs.* +import playground.smithyql.parser.Codecs.* import playground.smithyql.parser.ParserSuite object StructParserTests extends ParserSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/generative/UseServiceParserTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/generative/UseServiceParserTests.scala index ccb8aa67..052e3c93 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/generative/UseServiceParserTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/generative/UseServiceParserTests.scala @@ -1,8 +1,8 @@ package playground.smithyql.parser.generative -import playground.smithyql.Diffs._ -import playground.smithyql._ -import playground.smithyql.parser.Codecs._ +import playground.smithyql.* +import playground.smithyql.Diffs.* +import playground.smithyql.parser.Codecs.* import playground.smithyql.parser.ParserSuite object UseServiceParserTests extends ParserSuite { diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerExampleTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerExampleTests.scala index d6680264..0b1780d6 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerExampleTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerExampleTests.scala @@ -1,7 +1,7 @@ package playground.smithyql.parser.v2 -import playground.smithyql.parser.v2.scanner.TokenKind._ -import weaver._ +import playground.smithyql.parser.v2.scanner.TokenKind.* +import weaver.* object ScannerExampleTests extends SimpleIOSuite with ScannerSuite { scanTest( diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerSuite.scala b/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerSuite.scala index 4c78d373..9ed715fe 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerSuite.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerSuite.scala @@ -1,15 +1,15 @@ package playground.smithyql.parser.v2 import cats.effect.IO -import cats.implicits._ +import cats.syntax.all.* import org.scalacheck.Arbitrary import org.scalacheck.Gen import playground.Assertions import playground.smithyql.parser.v2.scanner.Scanner import playground.smithyql.parser.v2.scanner.Token -import weaver._ +import weaver.* -import Diffs._ +import Diffs.* import Scanner.scan trait ScannerSuite { self: IOSuite => diff --git a/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerTests.scala b/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerTests.scala index 7b746be0..5bcbb054 100644 --- a/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerTests.scala +++ b/modules/parser/src/test/scala/playground/smithyql/parser/v2/ScannerTests.scala @@ -1,16 +1,16 @@ package playground.smithyql.parser.v2 import cats.Show -import cats.implicits._ import cats.parse.Numbers +import cats.syntax.all.* import org.scalacheck.Arbitrary import playground.Assertions import playground.smithyql.parser.v2.scanner.Scanner -import playground.smithyql.parser.v2.scanner.TokenKind._ -import weaver._ +import playground.smithyql.parser.v2.scanner.TokenKind.* +import weaver.* import weaver.scalacheck.Checkers -import Diffs._ +import Diffs.* import Scanner.scan object ScannerTests extends SimpleIOSuite with Checkers with ScannerSuite { diff --git a/modules/plugin-core/src/main/scala/playground/plugins/PlaygroundPlugin.scala b/modules/plugin-core/src/main/scala/playground/plugins/PlaygroundPlugin.scala index b192fd6d..b4da95c8 100644 --- a/modules/plugin-core/src/main/scala/playground/plugins/PlaygroundPlugin.scala +++ b/modules/plugin-core/src/main/scala/playground/plugins/PlaygroundPlugin.scala @@ -7,7 +7,7 @@ import smithy4s.UnsupportedProtocolError import smithy4s.http4s.SimpleProtocolBuilder import java.util.ServiceLoader -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* trait PlaygroundPlugin { def simpleBuilders: List[SimpleHttpBuilder] diff --git a/modules/source/src/main/scala/playground/smithyql/WithSource.scala b/modules/source/src/main/scala/playground/smithyql/WithSource.scala index 75a92c41..6a455f58 100644 --- a/modules/source/src/main/scala/playground/smithyql/WithSource.scala +++ b/modules/source/src/main/scala/playground/smithyql/WithSource.scala @@ -5,9 +5,9 @@ import cats.Eval import cats.Id import cats.NonEmptyTraverse import cats.Show -import cats.implicits._ import cats.kernel.Eq import cats.kernel.Order +import cats.syntax.all.* import cats.~> import playground.smithyql.InputNode import playground.smithyql.Query diff --git a/modules/source/src/test/scala/playground/smithyql/Diffs.scala b/modules/source/src/test/scala/playground/smithyql/Diffs.scala index 15a39f50..d97d97c4 100644 --- a/modules/source/src/test/scala/playground/smithyql/Diffs.scala +++ b/modules/source/src/test/scala/playground/smithyql/Diffs.scala @@ -3,8 +3,8 @@ package playground.smithyql import com.softwaremill.diffx.Diff object Diffs { - import com.softwaremill.diffx.cats._ - import com.softwaremill.diffx.generic.auto._ + import com.softwaremill.diffx.cats.* + import com.softwaremill.diffx.generic.auto.* implicit val diffSourceRange: Diff[SourceRange] = Diff.derivedDiff