Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.18] Remove CE2 support #865

Merged
merged 3 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,22 @@ concurrency:

jobs:
build:
name: Test ${{matrix.ceVersion}} ${{matrix.scalaVersion}} (${{matrix.scalaPlatform}})
name: Test ${{matrix.scalaVersion}} (${{matrix.scalaPlatform}})
strategy:
fail-fast: true
matrix:
scalaVersion: ["2_12", "2_13", "3_0"]
scalaPlatform: ["jvm", "js"]
ceVersion: ["CE2", "default"]
exclude:
# Do not build CE2 artifacts for Scala 3
- scalaVersion: "3_0"
ceVersion: "CE2"
# Do not build CE2 artifacts for Scalajs
- scalaPlatform: "js"
ceVersion: "CE2"
# Do not build 2.12 artifacts for Scalajs
- scalaVersion: "2_12"
scalaPlatform: "js"
include:
- scalaVersion: "3_0"
scalaPlatform: "native"
ceVersion: "default"
runs-on: ubuntu-latest
env:
BUILD_KEY: ${{matrix.ceVersion}}_${{matrix.scalaVersion}}_${{matrix.scalaPlatform}}
BUILD_KEY: ${{matrix.scalaVersion}}_${{matrix.scalaPlatform}}
steps:
- name: Checkout current branch
uses: actions/checkout@v3
Expand All @@ -69,12 +61,12 @@ jobs:
-J-Xmx4G

- name: Run plugin tests
if: matrix.scalaVersion == '2_12' && matrix.scalaPlatform == 'jvm' && matrix.ceVersion == 'CE2'
if: matrix.scalaVersion == '2_12' && matrix.scalaPlatform == 'jvm'
run: |
sbt scripted

- name: Run checks
if: matrix.scalaVersion == '2_13' && matrix.scalaPlatform == 'jvm' && matrix.ceVersion == 'default'
if: matrix.scalaVersion == '2_13' && matrix.scalaPlatform == 'jvm'
run: |
sbt scalafmtCheckAll \
headerCheck \
Expand Down
51 changes: 3 additions & 48 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ lazy val docs =
"AWS_SPEC_VERSION" -> Dependencies.AwsSpecSummary.awsSpecSummaryVersion
),
mdocExtraArguments := Seq("--check-link-hygiene"),
isCE3 := true,
libraryDependencies ++= Seq(
Dependencies.Jsoniter.macros.value,
Dependencies.Http4s.emberClient.value,
Expand Down Expand Up @@ -270,7 +269,6 @@ lazy val `aws-kernel` = projectMatrix
.in(file("modules/aws-kernel"))
.dependsOn(core)
.settings(
isCE3 := true,
libraryDependencies ++= Seq(
Dependencies.Weaver.cats.value % Test,
Dependencies.Weaver.scalacheck.value % Test
Expand Down Expand Up @@ -309,7 +307,6 @@ lazy val aws = projectMatrix
.in(file("modules/aws"))
.dependsOn(`aws-kernel`, json, xml)
.settings(
isCE3 := true,
libraryDependencies ++= {
// Only building this module against CE3
Seq(
Expand Down Expand Up @@ -346,7 +343,6 @@ lazy val `aws-http4s` = projectMatrix
.in(file("modules/aws-http4s"))
.dependsOn(aws)
.settings(
isCE3 := true,
libraryDependencies ++= {
Seq(
Dependencies.Http4s.client.value,
Expand Down Expand Up @@ -417,7 +413,6 @@ lazy val `codegen-cli` = projectMatrix
.dependsOn(codegen)
.jvmPlatform(List(Scala213), jvmDimSettings)
.settings(
isCE3 := true,
libraryDependencies ++= Seq(
Dependencies.Decline.core.value,
Dependencies.Weaver.cats.value % Test
Expand Down Expand Up @@ -510,7 +505,6 @@ lazy val millCodegenPlugin = projectMatrix
lazy val decline = (projectMatrix in file("modules/decline"))
.settings(
name := "decline",
isCE3 := true,
libraryDependencies ++= List(
Dependencies.Cats.core.value,
Dependencies.CatsEffect3.value,
Expand Down Expand Up @@ -554,7 +548,6 @@ lazy val protocolTests = projectMatrix
.jvmPlatform(Seq(Scala213), jvmDimSettings)
.dependsOn(protocol)
.settings(
isCE3 := true,
libraryDependencies ++= Seq(
Dependencies.Weaver.cats.value % Test,
Dependencies.Weaver.scalacheck.value % Test
Expand Down Expand Up @@ -631,7 +624,6 @@ lazy val xml = projectMatrix
scalacheck % "test -> compile"
)
.settings(
isCE3 := true,
isMimaEnabled := false,
libraryDependencies ++= Seq(
Dependencies.Fs2Data.xml.value,
Expand Down Expand Up @@ -659,14 +651,9 @@ lazy val http4s = projectMatrix
testUtils % "test->compile"
)
.settings(
isCE3 := virtualAxes.value.contains(CatsEffect3Axis),
isMimaEnabled := true,
libraryDependencies ++= {
val ce3 =
if (isCE3.value) Seq(Dependencies.CatsEffect3.value)
else Seq.empty

ce3 ++ Seq(
Seq(
Dependencies.Http4s.core.value,
Dependencies.Http4s.dsl.value,
Dependencies.Http4s.client.value,
Expand All @@ -678,11 +665,6 @@ lazy val http4s = projectMatrix
Dependencies.Http4s.emberServer.value % Test
)
},
moduleName := {
if (virtualAxes.value.contains(CatsEffect2Axis))
moduleName.value + "-ce2"
else moduleName.value
},
Test / allowedNamespaces := Seq("smithy4s.hello"),
Test / smithySpecs := Seq(
(ThisBuild / baseDirectory).value / "sampleSpecs" / "hello.smithy"
Expand Down Expand Up @@ -714,18 +696,12 @@ lazy val `http4s-swagger` = projectMatrix
.in(file("modules/http4s-swagger"))
.dependsOn(http4s)
.settings(
isCE3 := virtualAxes.value.contains(CatsEffect3Axis),
libraryDependencies ++= {
Seq(
Dependencies.Weaver.cats.value % Test,
Dependencies.Webjars.swaggerUi,
Dependencies.Webjars.webjarsLocator
)
},
moduleName := {
if (virtualAxes.value.contains(CatsEffect2Axis))
moduleName.value + "-ce2"
else moduleName.value
}
)
.http4sJvmPlatform(allJvmScalaVersions, jvmDimSettings)
Expand All @@ -749,16 +725,11 @@ lazy val tests = projectMatrix
.in(file("modules/tests"))
.dependsOn(core)
.settings(
isCE3 := virtualAxes.value.contains(CatsEffect3Axis),
allowedNamespaces := Seq(
"smithy4s.example"
),
libraryDependencies ++= {
val ce3 =
if (isCE3.value) Seq(Dependencies.CatsEffect3.value)
else Seq.empty

ce3 ++ Seq(
Seq(
Dependencies.Http4s.core.value,
Dependencies.Http4s.dsl.value,
Dependencies.Http4s.client.value,
Expand All @@ -771,11 +742,6 @@ lazy val tests = projectMatrix
(ThisBuild / baseDirectory).value / "sampleSpecs" / "weather.smithy",
(ThisBuild / baseDirectory).value / "sampleSpecs" / "recursiveInput.smithy"
),
moduleName := {
if (virtualAxes.value.contains(CatsEffect2Axis))
moduleName.value + "-ce2"
else moduleName.value
},
(Compile / sourceGenerators) := Seq(genSmithyScala(Compile).taskValue)
)
.http4sPlatform(allJvmScalaVersions, jvmDimSettings)
Expand All @@ -788,24 +754,15 @@ lazy val complianceTests = projectMatrix
Compile / allowedNamespaces := Seq("smithy.test", "smithy4s.example.test"),
Compile / smithy4sDependencies ++= Seq(Dependencies.Smithy.testTraits),
Compile / sourceGenerators := Seq(genSmithyScala(Compile).taskValue),
isCE3 := virtualAxes.value.contains(CatsEffect3Axis),
libraryDependencies ++= {
val ce3 =
if (isCE3.value) Seq(Dependencies.CatsEffect3.value)
else Seq.empty
ce3 ++ Seq(
Seq(
Dependencies.Circe.parser.value,
Dependencies.Http4s.circe.value,
Dependencies.Http4s.client.value,
Dependencies.Weaver.cats.value % Test,
Dependencies.Pprint.core.value
)
},
moduleName := {
if (virtualAxes.value.contains(CatsEffect2Axis))
moduleName.value + "-ce2"
else moduleName.value
}
)
.http4sPlatform(allJvmScalaVersions, jvmDimSettings)

Expand Down Expand Up @@ -850,7 +807,6 @@ lazy val example = projectMatrix
(ThisBuild / baseDirectory).value / "sampleSpecs" / "numeric.smithy"
),
Compile / resourceDirectory := (ThisBuild / baseDirectory).value / "modules" / "example" / "resources",
isCE3 := true,
libraryDependencies += Dependencies.Http4s.emberServer.value,
genSmithy(Compile),
genSmithyOutput := ((ThisBuild / baseDirectory).value / "modules" / "example" / "src"),
Expand All @@ -877,7 +833,6 @@ lazy val guides = projectMatrix
(ThisBuild / baseDirectory).value / "modules" / "guides" / "smithy" / "auth.smithy"
),
genSmithy(Compile),
isCE3 := true,
libraryDependencies ++= Seq(
Dependencies.Http4s.emberServer.value,
Dependencies.Http4s.emberClient.value,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2021-2022 Disney Streaming
*
* Licensed under the Tomorrow Open Source Technology License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://disneystreaming.github.io/TOST-1.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package smithy4s.codegen.internals

final class ScaladocSpec extends munit.FunSuite {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package smithy4s.compliancetests

import cats.effect.Async
import smithy4s.Service

/**
Expand All @@ -31,7 +32,7 @@ object HttpProtocolCompliance {
def clientTests[F[_], Alg[_[_, _, _, _, _]]](
reverseRouter: ReverseRouter[F],
service: Service[Alg]
)(implicit ce: CompatEffect[F]): List[ComplianceTest[F]] =
)(implicit ce: Async[F]): List[ComplianceTest[F]] =
new internals.ClientHttpComplianceTestCase[F, Alg](
reverseRouter,
service
Expand All @@ -40,7 +41,7 @@ object HttpProtocolCompliance {
def serverTests[F[_], Alg[_[_, _, _, _, _]]](
router: Router[F],
service: Service[Alg]
)(implicit ce: CompatEffect[F]): List[ComplianceTest[F]] =
)(implicit ce: Async[F]): List[ComplianceTest[F]] =
new internals.ServerHttpComplianceTestCase[F, Alg](
router,
service
Expand All @@ -49,7 +50,7 @@ object HttpProtocolCompliance {
def clientAndServerTests[F[_], Alg[_[_, _, _, _, _]]](
router: Router[F] with ReverseRouter[F],
service: Service[Alg]
)(implicit ce: CompatEffect[F]): List[ComplianceTest[F]] =
)(implicit ce: Async[F]): List[ComplianceTest[F]] =
clientTests(router, service) ++ serverTests(router, service)

}
Loading