An sbt plugin for missinglink.
Add the following lines in
addSbtPlugin("ch.epfl.scala" % "sbt-missinglink" % "<sbt-missinglink-version>") libraryDependencies += "com.spotify" % "missinglink-core" % "<missinglink-core-version>"
You can find the latest
missinglink-core version in their release list.
Then, run the following task for the project you want to test:
This will check that the transitive dependencies of your project do not exhibit
any binary compatibility conflict, assuming that the methods of your
src/main/) are all called.
Testing another configuration
You can test another configuration, such as
Do not fail on conflicts
By default, the plugin fails the build if any conflicts are found.
It can be disabled by the
missinglinkFailOnConflicts := false
Ignore conflicts in certain packages
Conflicts can be ignored based on the package name of the class that has the conflict.
There are separate configuration options for ignoring conflicts on the "source" side of the conflict and the "destination" side of the conflict.
Packages on the source side can be ignored with
missinglinkIgnoreSourcePackages and packages on the destination side can be ignored with
missinglinkIgnoreDestinationPackages += IgnoredPackage("com.google.common") missinglinkIgnoreSourcePackages += IgnoredPackage("com.example")
By default, all subpackages of the specified package are also ignored, but this can be disabled by the
IgnoredPackage("test", ignoreSubpackages = false).
Excluding some dependencies from the analysis
You can exclude certain dependencies using
missinglinkExcludedDependencies += moduleFilter(organization = "com.google.guava") missinglinkExcludedDependencies += moduleFilter(organization = "ch.qos.logback", name = "logback-core")
Limiting the concurrency
sbt runs the missing-link analysis on the modules you have concurrently.
Analysis of each module can take up a considerable amount of memory,
so you might want to limit the degree of concurrency.
To run missing-link at most on 4 projects at a time, add this setting to your project
concurrentRestrictions += Tags.limit(missinglinkConflictsTag, 4)
You can find more information about the problem statement, caveats and limitations, etc. in the upstream project missinglink.
This project is funded by the Scala Center.