Slackbot
03/28/2023, 12:58 PMAlon Eitan
03/28/2023, 12:59 PMdependencyInsight
was hard to understand, I couldn't get any actionable insights from itVampire
03/28/2023, 1:22 PMdependencyInsight
output, or are you maybe able to share a build scan?Alon Eitan
03/28/2023, 1:24 PMdependencyInsight
and am encountering a problem, I'll try to get it to work and then I'll share the outputAlon Eitan
03/28/2023, 2:00 PM16:51:06: Executing ':common:dependencyInsight --dependency com.fasterxml.jackson.core:jackson-core --configuration default -q'...
com.fasterxml.jackson.core:jackson-core:2.15.0-rc1
variant "runtimeElements" [
org.gradle.category = library (not requested)
org.gradle.dependency.bundling = external (not requested)
org.gradle.libraryelements = jar (not requested)
org.gradle.usage = java-runtime (not requested)
org.gradle.status = release (not requested)
]
Selection reasons:
- By constraint : dependency was locked to version '2.15.0-rc1'
- By ancestor
com.fasterxml.jackson.core:jackson-core:{strictly 2.15.0-rc1} -> 2.15.0-rc1
\--- default
com.fasterxml.jackson.core:jackson-core:2.15.0-rc1
+--- com.fasterxml.jackson:jackson-bom:2.15.0-rc1
| +--- default (requested com.fasterxml.jackson:jackson-bom:{strictly 2.15.0-rc1})
| +--- com.<REDACTED>.engprod:platform:4.1.33.0 (requested com.fasterxml.jackson:jackson-bom:+)
| | +--- default (requested com.<REDACTED>.engprod:platform:+)
| | \--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (requested com.<REDACTED>.engprod:platform:2.3.91.0)
| | \--- default (requested com.<REDACTED>.engprod:engprod-commons:2.+)
| +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0-rc1
| | +--- default (requested com.fasterxml.jackson.datatype:jackson-datatype-jsr310:{strictly 2.15.0-rc1})
| | +--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (requested com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.0) (*)
| | \--- com.fasterxml.jackson:jackson-bom:2.15.0-rc1 (*)
| +--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.0-rc1
| | +--- default (requested com.fasterxml.jackson.dataformat:jackson-dataformat-xml:{strictly 2.15.0-rc1})
| | +--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (requested com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.0) (*)
| | \--- com.fasterxml.jackson:jackson-bom:2.15.0-rc1 (*)
| +--- com.fasterxml.jackson.core:jackson-databind:2.15.0-rc1
| | +--- default (requested com.fasterxml.jackson.core:jackson-databind:{strictly 2.15.0-rc1})
| | +--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (requested com.fasterxml.jackson.core:jackson-databind:2.14.0) (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0-rc1 (*)
| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.0-rc1 (*)
| | +--- com.fasterxml.jackson:jackson-bom:2.15.0-rc1 (*)
| | \--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.0-rc1
| | +--- default (requested com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:{strictly 2.15.0-rc1})
| | +--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (requested com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.0) (*)
| | \--- com.fasterxml.jackson:jackson-bom:2.15.0-rc1 (*)
| +--- com.fasterxml.jackson.core:jackson-core:2.15.0-rc1 (*)
| +--- com.fasterxml.jackson.core:jackson-annotations:2.15.0-rc1
| | +--- default (requested com.fasterxml.jackson.core:jackson-annotations:{strictly 2.15.0-rc1})
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0-rc1 (*)
| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.0-rc1 (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.15.0-rc1 (*)
| | \--- com.fasterxml.jackson:jackson-bom:2.15.0-rc1 (*)
| \--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.0-rc1 (*)
+--- com.fasterxml.jackson.core:jackson-databind:2.15.0-rc1 (*)
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.0-rc1 (*)
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.0-rc1 (*)
\--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0-rc1 (*)
com.fasterxml.jackson.core:jackson-core:2.12.1 -> 2.15.0-rc1
+--- com.google.cloud:google-cloud-firestore:2.2.4
| +--- default (requested com.google.cloud:google-cloud-firestore:{strictly 2.2.4})
| +--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0
| | \--- default (requested com.<REDACTED>.engprod:engprod-commons:2.+)
| \--- com.google.cloud:libraries-bom:19.0.0
| +--- default (requested com.google.cloud:libraries-bom:{strictly 19.0.0})
| \--- com.<REDACTED>.engprod:platform:4.1.33.0
| +--- default (requested com.<REDACTED>.engprod:platform:+)
| \--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (requested com.<REDACTED>.engprod:platform:2.3.91.0) (*)
\--- com.google.cloud:google-cloud-storage:1.113.12
+--- default (requested com.google.cloud:google-cloud-storage:{strictly 1.113.12})
+--- com.<REDACTED>.engprod:engprod-commons:2.3.91.0 (*)
\--- com.google.cloud:libraries-bom:19.0.0 (*)
(*) - dependencies omitted (listed previously)
A web-based, searchable dependency report is available by adding the --scan option.
16:51:07: Execution finished ':common:dependencyInsight --dependency com.fasterxml.jackson.core:jackson-core --configuration default -q'.
Alon Eitan
03/28/2023, 2:02 PMengprod-commons
project now..kyle
03/28/2023, 2:49 PMdependencyInsight
. Have you tried running your build with the --scan
option? The searchable nature of the dependency tree is really nice in the UI.Vampire
03/28/2023, 2:49 PMcom.<REDACTED>.engprod:platform:4.1.33.0
has com.fasterxml.jackson:jackson-bom:+
which means latest version availableAlon Eitan
03/28/2023, 3:02 PM--scan
because it sends sensitive build info to Gradle's Server which is against our security policykyle
03/28/2023, 3:03 PMAlon Eitan
03/28/2023, 3:03 PM2.+
while also preventing unstable versions?kyle
03/28/2023, 3:04 PMcom.fasterxml.jackson:jackson-bom:+
kyle
03/28/2023, 3:04 PMkyle
03/28/2023, 3:04 PMAlon Eitan
03/28/2023, 3:05 PMAlon Eitan
03/28/2023, 3:09 PMfoo
version 1.0
that has a dynamic dependency bar:+
, and at the time of publishing, the latest version of bar
was 1.0
, but a month later bar
releases version 2.0
, then someone using foo:1.0
will transitively get the dependency bar:2.0
instead of bar:1.0
?kyle
03/28/2023, 3:11 PMkyle
03/28/2023, 3:12 PMExample use cases for resolved versions:
• A project uses dynamic versions for dependencies but prefers exposing the resolved version for a given release to its consumers.
kyle
03/28/2023, 3:14 PMfoo:1.0.+
… this ensures that the latest patch release is always consumed. But you also take a risk that the owner of foo
understands semver and never makes any breaking changes in a patch release.Alon Eitan
03/28/2023, 3:15 PMfromResolutionResult
kyle
03/28/2023, 3:19 PMbar:+
to a major version, like bar:2.+
. This might help.Vampire
03/28/2023, 3:20 PMcom.<REDACTED>.engprod:platform
does not?
Because that is the one with the dynamic version dependency.Vampire
03/28/2023, 3:23 PMenforcedPlatform
, as the constraint comes out with strict versions.
enforcedPlatform
should almost never be used in an end-product except in rare edge cases, and practically never in a library project.
Gradle should even prominently warn you if you publish something with an enforced platform.Alon Eitan
03/28/2023, 3:26 PMenforcedPlatform
should not be used?Vampire
03/28/2023, 3:28 PMVampire
03/28/2023, 3:32 PMUsingneeds to be considered with care if your software component can be consumed by others. This declaration is effectively transitive and so will apply to the dependency graph of your consumers. Unfortunately they will have to useenforcedPlatform
if they happen to disagree with one of the forced versions.exclude
Instead, if your reusable software component has a strong opinion on some third party dependency versions, consider using a rich version declaration with a.strictly