deephaven-core icon indicating copy to clipboard operation
deephaven-core copied to clipboard

Tooling to validate library `api` dependencies

Open devinrsmith opened this issue 2 years ago • 3 comments

There doesn't seem to be any tooling to validate that java libraries are exposing the "correct" api dependencies. This is useful to ensure downstream consumers get the proper (compile) classpaths; but would also help during development to expose potential assumptions about the public api.

This would remove a class of bugs similar to https://github.com/deephaven/deephaven-core/issues/4402

Potential similarity with https://github.com/deephaven/deephaven-core/issues/4401

devinrsmith avatar Aug 30 '23 18:08 devinrsmith

See https://github.com/deephaven/deephaven-core/pull/4403#issuecomment-1699693690 for manual PoC.

devinrsmith avatar Aug 30 '23 19:08 devinrsmith

https://errorprone.info/ could be useful

devinrsmith avatar Nov 27 '23 22:11 devinrsmith

https://github.com/autonomousapps/dependency-analysis-gradle-plugin claims to do exactly this!

Dependencies declared on the wrong configuration (api vs implementation vs compileOnly, etc.).

devinrsmith avatar Jul 26 '25 13:07 devinrsmith