question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `mimaReportBinaryIssues / skip`

See original GitHub issue

As in publish / skip := true and friends, as a way to disable this task.

We’ve currently implemented this in https://github.com/typelevel/sbt-typelevel/pull/117#discussion_r795113203 to help accommodate build matrices with holes in them, where certain modules are not available for certain Scala versions.

Is this something you’re open to? I can try and help with a PR. Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
dwijnandcommented, Feb 14, 2022

You can do it for all the default tasks, obviously. And for other keys like mimaPreviousArtifacts you can still access them by name (SettingKey[Set[ModuleID]]("mimaPreviousArtifacts")).

Things get harder when their keys use their own types, but it’s possible:

Def.settings {
  try {
    val clazz = Class.forName("sbt.nio.Keys$WatchBuildSourceOption")
    val value = Class.forName("sbt.nio.Keys$IgnoreSourceChanges$").getDeclaredField("MODULE$").get(null)
    val manifest = new scala.reflect.Manifest[AnyRef]{ def runtimeClass = clazz }
    Seq(
      SettingKey[AnyRef]("onChangedBuildSource")(manifest, sbt.util.NoJsonWriter()) in Global := value
    )
  } catch {
    case e: Throwable =>
      Nil
  }
}
1reaction
raboofcommented, Feb 1, 2022

This PR introduces a custom +~ command that fixes both these limitations

Sounds cool, but I stopped reading there 😃 ideally sbt would support this out-of-the-box

Hehe that’s fair 😉. I think the +~ wasn’t really needed to make the build work though, only to re-introduce the functionality we previously implemented using scalaVersion :=.

but for now skip seems like it can get us close for 99% of use-cases.

👍 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

mimaReportBinaryIssues fails on branch 2.12.x #12344 - GitHub
[error] scala-library: Failed binary compatibility check against org.scala-lang:scala-library:2.12.13! Found 15 potential problems (filtered ...
Read more >
Contributor guide - Typelevel
If you get stuck on any of these steps, please feel free to ask for help. ... feel free to skip these steps...
Read more >
scalatest - Scaladex
ScalaTest. Build Status. ScalaTest is a free, open-source testing toolkit for Scala and Java programmers. Official Website: http://www.scalatest.org/ ...
Read more >
pdf - sbt Reference Manual
sbt uses a small number of concepts to support flexible and powerful ... We'll skip over the details of library dependencies until later...
Read more >
build.sbt · Gitee 极速下载/Scala
currently, many modules cannot support -Werror; ideally this setting will eventually ... "library/mimaReportBinaryIssues"), // doesn't aggregate.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found