Skip to content

Commit

Permalink
fail when deps advertize breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Mar 19, 2022
1 parent 5a4c18d commit 02acf6b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
- run: sbt "scalafixAll --check"
- run: ./bin/scalafmt --test
mima:
name: MiMa
name: Version Policy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: olafurpg/setup-scala@v13
- run: git fetch --unshallow
- run: sbt +mimaReportBinaryIssues
- run: sbt +versionPolicyCheck
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
- uses: olafurpg/setup-scala@v13
- uses: olafurpg/setup-gpg@v3
- run: git fetch --unshallow
- name: Check that major was bumped if bin compat was broken
if: startsWith(github.ref, 'refs/tags/v')
run: sbt versionCheck
- name: Publish ${{ github.ref }}
run: sbt ci-release
env:
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ lazy val core = project
.in(file("scalafix-core"))
.settings(
moduleName := "scalafix-core",
versionScheme := Some("pvp"),
buildInfoSettingsForCore,
libraryDependencies ++= List(
scalameta,
Expand Down
8 changes: 7 additions & 1 deletion project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import sbt.nio.Keys._
import sbt.plugins.JvmPlugin
import com.typesafe.tools.mima.plugin.MimaPlugin.autoImport._
import sbtbuildinfo.BuildInfoKey
import sbtbuildinfo.BuildInfoPlugin.autoImport.{BuildInfoKey, _}
import sbtbuildinfo.BuildInfoPlugin.autoImport._
import sbtversionpolicy.SbtVersionPolicyPlugin.autoImport._
import com.typesafe.sbt.sbtghpages.GhpagesKeys
import sbt.librarymanagement.ivy.IvyDependencyResolution
import sbt.plugins.IvyPlugin
Expand Down Expand Up @@ -179,6 +180,11 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
private val PreviousScalaVersion: Map[String, String] = Map(
)

override def buildSettings: Seq[Setting[_]] = List(
versionScheme := Some("pvp"),
versionPolicyIntention := Compatibility.None // TODO: harden after 0.10.0
)

override def projectSettings: Seq[Def.Setting[_]] = List(
scalacOptions ++= compilerOptions.value,
Compile / console / scalacOptions :=
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "2.0.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34")

0 comments on commit 02acf6b

Please sign in to comment.