-
Notifications
You must be signed in to change notification settings - Fork 30
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
Try to update to sbt-typelevel #449
Conversation
build.sbt
Outdated
lazy val commonJsSettings = Seq( | ||
scalaJSStage in Global := FastOptStage, | ||
Global / scalaJSStage := FastOptStage, | ||
parallelExecution := false, | ||
jsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv(), | ||
coverageEnabled := false | ||
) |
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.
basically none of these settings are needed, except for coverage.
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.
there are only four right? So you are saying "in commonJsSettings you may remove the first three settings"
The "basically" is confusing me since it sounds like you are saying something imprecise by adding that word.
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.
Yes you caught me :) To be precise:
Global / scalaJSStage := FastOptStage
is the default and unneededjsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv()
is the default and unneededparallelExecution := false
is not the default, but I'd be surprised if it's actually neededcoverageEnabled := false
is also quite likely not needed, there is coverage on SJS but its occasionally buggy. safe bet is to disable
build.sbt
Outdated
lazy val noPublish = commonSettings ++ Seq( | ||
skip in publish := true, | ||
publish / skip := true, | ||
mimaPreviousArtifacts := Set.empty, | ||
coverageEnabled := false | ||
) |
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.
We can remove these settings, anywhere you'd want them use NoPublishPlugin
instead.
We should skip the Native/Scala3 job in CI: githubWorkflowBuildMatrixExclusions +=
MatrixExclude(Map("project" -> "rootNative", "scala" -> Scala3Version)) |
build.sbt
Outdated
.enablePlugins(MdocPlugin) | ||
.enablePlugins(NoPublishPlugin) |
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 can do it in a follow-up PR, but I think if you add
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.4.6")
we can get a website for free, since it looks like the docs are not currently published.
.enablePlugins(MdocPlugin) | |
.enablePlugins(NoPublishPlugin) | |
.enablePlugins(TypelevelSitePlugin) |
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.
Also
ThisBuild / tlSitePublishBranch := Some("master")
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.
Oh, and intro.md
should be renamed to index.md
:)
ThisBuild / scalaVersion := Scala213 | ||
ThisBuild / tlVersionIntroduced := Map("3" -> "0.4.2") | ||
ThisBuild / crossScalaVersions := Seq(Scala213, Scala212, Scala3Version) | ||
ThisBuild / githubWorkflowBuildMatrixExclusions += | ||
MatrixExclude(Map("project" -> "rootNative", "scala" -> Scala3Version)) |
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.
We'll need this to get snapshots since the primary branch is master
not main
.
ThisBuild / tlCiReleaseBranches := Seq("master")
Adapting this from the ThisBuild / githubWorkflowAddedJobs +=
WorkflowJob(
id = "coverage",
name = "Generate coverage report",
scalas = List("2.13.8"),
steps = List(WorkflowStep.Checkout) ++ WorkflowStep.SetupJava(
githubWorkflowJavaVersions.value.toList
) ++ githubWorkflowGeneratedCacheSteps.value ++ List(
WorkflowStep.Sbt(List("coverage", "rootJVM/test", "coverageAggregate")),
WorkflowStep.Run(List("bash <(curl -s https://codecov.io/bash)"))
)
) |
Codecov Report
@@ Coverage Diff @@
## master #449 +/- ##
==========================================
- Coverage 99.51% 99.27% -0.25%
==========================================
Files 8 8
Lines 412 411 -1
Branches 41 37 -4
==========================================
- Hits 410 408 -2
- Misses 2 3 +1
Continue to review full report at Codecov.
|
) | ||
) | ||
|
||
ThisBuild / tlCiReleaseBranches := Seq("master") |
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.
ThisBuild / tlCiReleaseBranches := Seq("master") | |
ThisBuild / tlCiReleaseBranches := Seq("master") | |
ThisBuild / tlSitePublishBranch := Some("master") |
build.sbt
Outdated
.settings( | ||
noPublish, | ||
crossScalaVersions := List(Scala212), |
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.
crossScalaVersions := List(Scala212), | |
crossScalaVersions := List(Scala213), |
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.
Or actually, you can remove this setting completely.
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 think it looks good, thanks for taking this on :)
Final steps:
- Before merging, make sure to delete any publishing secrets from this repository, since these are now set at the org-level.
- After merging, it will create a gh-pages branch for the site. Then, you'll need to flip the switch in repo settings to enable site deploy from that branch.
address #448
We should try to verify that we are still testing everything especially that we didn't break scala-native
cc @armanbilge