You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unused deps fail to detect unused dependencies in our native_java_libraries macro. This is true for dependencies declared in the deps as well as native_libraries_deps field.
How to reproduce
Add a dependency that is sure to be unused. For example, add "@maven//:info_picocli_picocli" to //rocks:rocks:
## What is the goal of this PR?
Fix parsing of maven dependencies that do not conform to the `groupId:artifactId:version` standard, e.g., https://github.com/grpc/grpc-java/blob/bf191cb5ea56fe96e0ffa4c8936d3096c738fb07/repositories.bzl#L18
## What are the changes implemented in this PR?
Adds more forgiving parsing of maven coordinates by using the first two values as the group & artifact IDs and the last value as the version, ignoring any other values inbetween.
Description
Unused deps fail to detect unused dependencies in our
native_java_libraries
macro. This is true for dependencies declared in thedeps
as well asnative_libraries_deps
field.How to reproduce
"@maven//:info_picocli_picocli"
to//rocks:rocks
:https://github.com/graknlabs/grakn/blob/7ef3ac2843774173c72d1e69d658c0c2f21006f0/rocks/BUILD#L29-L70
bazel run @graknlabs_dependencies//tool/unuseddeps:unused-deps -- remove
Expected output
The
"@maven//:info_picocli_picocli"
dep should be removedActual output
The
"@maven//:info_picocli_picocli"
dep is not removedThe text was updated successfully, but these errors were encountered: