Closed keithl-stripe closed 1 year ago
Immediate thought - unused-deps is a generic name that's doesn't scope the product to just java which I believe is the current scope of this tool. Maybe unused-java-deps is a better name, although appreciate that the name follows from the google tools heritage.
I guess implicit in this is the question of how specific to java is this tooling? Could it have a gazelle like plugin ecosystem to allow it to be expanded to other languages?
The tool does three things (roughly):
The first and last step are fairly generic, but the middle step is implemented as a compiler plugin to javac
. I'm not sure there would be a ton of value in making this pluggable as the other two parts are rather straight-forward.
I'm open to a better name, especially because this one is almost identical to Google's unused_deps tool (which is not supported anymore, and is buggy).
However I imagine someone might want to come along and add Scala and/or Kotlin support, in which case unused-java-deps
might be too specific.
I agree that the name doesn't match the scope. I'd love to see a tool that aspires to remove unused deps in all languages.
Assuming you want to keep the scope...
Could this just be a feature that lives in https://github.com/bazel-contrib/rules_jvm ?
If it's a standalone repo, maybe unused-jvm-deps
is a good name as we already have "rules_jvm_external" and so on.
In the SIG meeting we decided to create bazel-contrib/unused_jvm_deps
I created unused_jvm_deps as private. I have invited @keithl-stripe and @murray-stripe to the repo. They should be good to proceed with setting up the repository and making it public.
I did not realize that unused-jvm-deps had already been created. This is the repo that will be used.
(see Slack thread)
We'd like to open-source
unused-deps
, a command-line tool for finding Bazel dependencies which are not actually used in code. (details) Nick Korostelev from Snapchat suggested we submit it to bazel-contrib, and it seems like a good fit!We would prefer to use MIT if possible.
After our BazelCon 2022 talk, about 10 people at various companies have reached out (Snapchat, Roku, etc.) asking us to open-source the tool.
It is useful to most Bazel users who use Java.
Happy to be that person!
While we don't have a public repo yet, I copied our README into a gist:
https://gist.github.com/keithl-stripe/870c199d9a1267fda0101cf95ec1f3aa
This is not an API – do we need this?
Our README shows examples.
Any suggestions for this? Stripe doesn't have any contracts with CI providers.
Happy to comply with this. Internally Stripe has 5-day SLO for this :)
@keithl-stripe and @murray-stripe, at minimum, are available from our team.
OK!
We can do this. Initial release will probably just be 0.1.
It works with Bazel 5.3.2!