-
Notifications
You must be signed in to change notification settings - Fork 5
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
Migrate to sbt-http4s-org
plugin
#97
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
babaee1
Migrate to sbt-http4s-org plugin
danicheg 57b3af3
Regenerate ci.yml
danicheg ee55993
Add Scalafix config
danicheg afd428a
Run Scalafix rules
danicheg d132553
Add Scalafmt conf
danicheg b92d1db
Scalafmt
danicheg 6bb0ae0
Temporarily disable sbt-header plugin
danicheg 59664fd
Fix tests
danicheg d7695d7
Disable '-Xfatal-warning' in codeGeneratorTesting module
danicheg e53ca60
Don't check for unused compile dependencies
danicheg 9917180
Remove some old sbt settings
danicheg 3fcbcfc
Temporarily disable dependency submissions in CI
danicheg d9cbad9
Merge branch 'main' into sbt-http4s-org
danicheg bfb7309
Add the .git-blame-ignore-revs
danicheg 163282f
Bump tlBaseVersion to 0.1
danicheg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
rules = [ | ||
Http4sFs2Linters | ||
Http4sGeneralLinters | ||
Http4sUseLiteralsSyntax | ||
LeakingImplicitClassVal | ||
ExplicitResultTypes | ||
OrganizeImports | ||
] | ||
|
||
triggered.rules = [ | ||
Http4sFs2Linters | ||
Http4sGeneralLinters | ||
Http4sUseLiteralsSyntax | ||
LeakingImplicitClassVal | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version = 3.8.0 | ||
|
||
style = default | ||
|
||
maxColumn = 100 | ||
|
||
// Docstring wrapping breaks doctests | ||
docstrings.wrap = false | ||
|
||
// Vertical alignment is pretty, but leads to bigger diffs | ||
align.preset = none | ||
|
||
danglingParentheses.preset = true | ||
|
||
rewrite.rules = [ | ||
AvoidInfix | ||
RedundantBraces | ||
RedundantParens | ||
PreferCurlyFors | ||
SortModifiers | ||
] | ||
|
||
rewrite.sortModifiers.order = [ | ||
override, implicit, private, protected, final, sealed, abstract, lazy | ||
] | ||
|
||
rewrite.trailingCommas.style = multiple | ||
|
||
runner.dialect = scala212 | ||
|
||
fileOverride { | ||
"glob:**/scala-3/**/*.scala" { | ||
runner.dialect = scala3 | ||
} | ||
"glob:**/scala-2.13/**/*.scala" { | ||
runner.dialect = scala213 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import explicitdeps.ExplicitDepsPlugin.autoImport.moduleFilterRemoveValue | ||
|
||
ThisBuild / tlBaseVersion := "0.0" // your current series x.y | ||
|
||
ThisBuild / organization := "io.chrisdavenport" | ||
ThisBuild / organizationName := "Christopher Davenport" | ||
ThisBuild / licenses := Seq(License.MIT) | ||
ThisBuild / developers := List( | ||
tlGitHubDev("christopherdavenport", "Christopher Davenport") | ||
) | ||
ThisBuild / tlCiReleaseBranches := Seq("main") | ||
ThisBuild / tlSonatypeUseLegacyHost := true | ||
ThisBuild / tlSonatypeUseLegacyHost := false | ||
|
||
ThisBuild / tlMimaPreviousVersions := Set() | ||
|
||
|
@@ -17,6 +17,12 @@ val Scala213 = "2.13.12" | |
ThisBuild / crossScalaVersions := Seq(Scala213, "3.3.1") | ||
ThisBuild / scalaVersion := Scala213 | ||
|
||
// disable sbt-header plugin until we are not aligned on the license | ||
ThisBuild / headerCheckAll := Nil | ||
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
// temporarily disable dependency submissions in CI | ||
ThisBuild / tlCiDependencyGraphJob := false | ||
|
||
val catsV = "2.10.0" | ||
val catsEffectV = "3.5.4" | ||
val fs2V = "3.9.2" | ||
|
@@ -27,41 +33,47 @@ import scalapb.compiler.Version.scalapbVersion | |
// Projects | ||
lazy val `http4s-grpc` = tlCrossRootProject | ||
.aggregate(core, codeGenerator, codeGeneratorTesting, codeGeneratorPlugin) | ||
.settings( | ||
unusedCompileDependenciesFilter -= moduleFilter() | ||
) | ||
.disablePlugins(HeaderPlugin) | ||
|
||
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) | ||
.crossType(CrossType.Pure) | ||
.in(file("core")) | ||
.settings( | ||
name := "http4s-grpc", | ||
|
||
libraryDependencies ++= Seq( | ||
"org.typelevel" %%% "cats-core" % catsV, | ||
"org.typelevel" %%% "cats-effect" % catsEffectV, | ||
|
||
"co.fs2" %%% "fs2-core" % fs2V, | ||
"co.fs2" %%% "fs2-io" % fs2V, | ||
"co.fs2" %%% "fs2-scodec" % fs2V, | ||
|
||
"org.http4s" %%% "http4s-dsl" % http4sV, | ||
"org.http4s" %%% "http4s-ember-server" % http4sV, | ||
"org.http4s" %%% "http4s-ember-client" % http4sV, | ||
|
||
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectV % Test, | ||
|
||
"org.typelevel" %%% "cats-core" % catsV, | ||
"org.typelevel" %%% "cats-effect" % catsEffectV, | ||
"co.fs2" %%% "fs2-core" % fs2V, | ||
"co.fs2" %%% "fs2-io" % fs2V, | ||
"co.fs2" %%% "fs2-scodec" % fs2V, | ||
"org.http4s" %%% "http4s-dsl" % http4sV, | ||
"org.http4s" %%% "http4s-ember-server" % http4sV, | ||
"org.http4s" %%% "http4s-ember-client" % http4sV, | ||
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectV % Test, | ||
"com.thesamet.scalapb" %%% "scalapb-runtime" % scalapbVersion, | ||
|
||
) | ||
).jsSettings( | ||
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule)}, | ||
), | ||
unusedCompileDependenciesFilter -= moduleFilter(), | ||
) | ||
|
||
lazy val codeGenerator = project.in(file("codegen/generator")).settings( | ||
name := "http4s-grpc-generator", | ||
crossScalaVersions := Seq(Scala212), | ||
libraryDependencies ++= Seq( | ||
"com.thesamet.scalapb" %% "compilerplugin" % scalapbVersion | ||
.jsSettings( | ||
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) } | ||
) | ||
) | ||
.disablePlugins(HeaderPlugin) | ||
|
||
lazy val codeGenerator = | ||
project | ||
.in(file("codegen/generator")) | ||
.settings( | ||
name := "http4s-grpc-generator", | ||
crossScalaVersions := Seq(Scala212), | ||
libraryDependencies ++= Seq( | ||
"com.thesamet.scalapb" %% "compilerplugin" % scalapbVersion | ||
), | ||
unusedCompileDependenciesFilter -= moduleFilter(), | ||
) | ||
.disablePlugins(HeaderPlugin, ScalafixPlugin) | ||
|
||
lazy val codegenFullName = | ||
"org.http4s.grpc.generator.Http4sGrpcCodeGenerator" | ||
|
@@ -86,35 +98,42 @@ lazy val codeGeneratorPlugin = project | |
"com.thesamet.scalapb" %% "compilerplugin" % scalapbVersion | ||
), | ||
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7"), | ||
addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.2") | ||
addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.2"), | ||
unusedCompileDependenciesFilter -= moduleFilter(), | ||
) | ||
.disablePlugins(HeaderPlugin, ScalafixPlugin) | ||
|
||
lazy val codeGeneratorTesting = crossProject(JVMPlatform, JSPlatform, NativePlatform) | ||
.crossType(CrossType.Pure) | ||
.in(file("codegen/testing")) | ||
.enablePlugins(LocalCodeGenPlugin, BuildInfoPlugin, NoPublishPlugin) | ||
.dependsOn(core) | ||
.settings( | ||
tlFatalWarnings := false, | ||
codeGenClasspath := (codeGenerator / Compile / fullClasspath).value, | ||
Compile / PB.targets := Seq( | ||
scalapb.gen(grpc = false) -> (Compile / sourceManaged).value / "scalapb", | ||
genModule(codegenFullName + "$") -> (Compile / sourceManaged).value / "http4s-grpc" | ||
genModule(codegenFullName + "$") -> (Compile / sourceManaged).value / "http4s-grpc", | ||
), | ||
Compile / PB.protoSources += baseDirectory.value.getParentFile / "src" / "main" / "protobuf", | ||
libraryDependencies ++= Seq( | ||
"com.thesamet.scalapb" %%% "scalapb-runtime" % scalapbVersion % "protobuf", | ||
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectV % Test, | ||
"org.typelevel" %%% "scalacheck-effect-munit" % "2.0.0-M2" % Test | ||
"org.typelevel" %%% "scalacheck-effect-munit" % "2.0.0-M2" % Test, | ||
), | ||
buildInfoPackage := "org.http4s.grpc.e2e.buildinfo", | ||
buildInfoKeys := Seq[BuildInfoKey]("sourceManaged" -> (Compile / sourceManaged).value / "http4s-grpc"), | ||
githubWorkflowArtifactUpload := false | ||
buildInfoKeys := Seq[BuildInfoKey]( | ||
"sourceManaged" -> (Compile / sourceManaged).value / "http4s-grpc" | ||
), | ||
githubWorkflowArtifactUpload := false, | ||
unusedCompileDependenciesFilter -= moduleFilter(), | ||
) | ||
.disablePlugins(HeaderPlugin, ScalafixPlugin) | ||
|
||
|
||
lazy val site = project.in(file("site")) | ||
lazy val site = project | ||
.in(file("site")) | ||
.enablePlugins(TypelevelSitePlugin) | ||
.dependsOn(core.jvm) | ||
.settings( | ||
tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate), | ||
tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate) | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm willing to set it to
0.1
. Any objections?