Ability to tune unused dependency handling per target#1326
Ability to tune unused dependency handling per target#1326larshagencognite wants to merge 1 commit intobazelbuild:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
kotlin/internal/jvm/jvm.bzl
Outdated
| providers = [_JavacOptions], | ||
| mandatory = False, | ||
| ), | ||
| "experimental_report_unused_deps": attr.string( |
There was a problem hiding this comment.
We'd like to avoid collecting excessive attributes like these on the top level rule definitions so that we aren't cluttering our rule definitions over time.
Would you be open to using tags to opt targets out of this feature? There are a few examples around the codebase already where we follow this pattern.
There was a problem hiding this comment.
I think tags for the unused deps report mode would work well, I assume you mean like this?
kt_experimental_report_unused_deps_off <-> experimental_report_unused_deps="off"
kt_experimental_report_unused_deps_warn <-> experimental_report_unused_deps="warn"
kt_experimental_report_unused_deps_error <-> experimental_report_unused_deps="error"
When it comes to defining a list of labels to ignore, I would assume it would have to be something like this?
kt_experimental_unused_deps_ignored_target:<target_label1>
kt_experimental_unused_deps_ignored_target:<target_label2>
kt_experimental_unused_deps_ignored_target:<target_label3>
...
Seems doable, did I capture your intention?
There was a problem hiding this comment.
You can leave out the kt_experimental_ for the tags. Since unused deps is going to be a fun exercise to get right, I expect this api will be around for a while.
39126bc to
21888d4
Compare
No description provided.