scalacenter / sbt-missinglink

An sbt plugin for missinglink
Apache License 2.0
133 stars 14 forks source link

Add option to also scan all dependencies #49

Closed sjenna closed 1 year ago

sjenna commented 1 year ago

Salutations! I would like to suggest and implement a feature to optionally scan all dependencies for binary compatibility conflicts, not just code paths that are actually used.

My use case is that I'm maintaining a list of open source project versions that work with each other. Multiple other projects then depend on the versions defined in that list. This ultimately reduces the number of scala-steward PRs that need to be reviewed, while reducing the likelihood of binary compatibility errors.

I would like to introduce this plugin to actually test that there are no binary incompatibilities. However, the plugin currently only supports scanning code paths that are actually used. In order to test the dependencies themselves, I need the plugin to scan all code paths in those dependencies.


Background aside, this PR introduces a new setting missinglinkScanDependencies, which defaults to false. When set to true, it causes missinglink to scan starting from the full classpath (minus exclusions) instead of the classes in the project being built. This is intended for libraries with many dependencies, to assert that dependent projects can safely use those transitive dependencies themselves without needing to run missinglink again.