Using the why task to get information about multiple dependencies is rather cumbersome.
For example, I may want to get information about all Jackson dependencies. The only way to do that today is providing all the relevant hashes as a comma-separated value, which requires some command line manipulation:
What do the change types mean?
- `feature`: A new feature of the service.
- `improvement`: An incremental improvement in the functionality or operation of the service.
- `fix`: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
- `break`: Has the potential to break consumers of this service's API, inclusive of both Palantir services
and external consumers of the service's API (e.g. customer-written software or integrations).
- `deprecation`: Advertises the intention to remove service functionality without any change to the
operation of the service itself.
- `manualTask`: Requires the possibility of manual intervention (running a script, eyeballing configuration,
performing database surgery, ...) at the time of upgrade for it to succeed.
- `migration`: A fully automatic upgrade migration task with no engineer input required.
_Note: only one type should be chosen._
How are new versions calculated?
- ❗The `break` and `manual task` changelog types will result in a major release!
- 🐛 The `fix` changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
- ✨ All others will result in a minor version release.
The `why` task now supports a `--dependency` option that matches the behavior of `dependencyInsight`.
**Check the box to generate changelog(s)**
- [x] Generate changelog entry
Before this PR
Using the
why
task to get information about multiple dependencies is rather cumbersome.For example, I may want to get information about all Jackson dependencies. The only way to do that today is providing all the relevant hashes as a comma-separated value, which requires some command line manipulation:
After this PR
The
dependencyInsight
command uses--dependency
parameter which matches uses a simplecontains
check.https://github.com/gradle/gradle/blob/5479bbb152f69f27746c4528778b5c01e6eb794a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/dsl/DependencyResultSpec.java#L34-L43
I find this easy to use and sufficient for nearly all the queries I want to make.
There's also value is offering an interface that is consistent with
dependencyInsight
.This PR adds a
--dependency
option to thewhy
task that behaves more-or-less identically to the same parameter withdependencyInsight
.For example, here's the output running against https://github.com/palantir/tritium:
The
--hash
parameter is still supported to maintain backwards compatibility.