Good morning everyone! I have been upgrading dep...
# general
s
Good morning everyone! I have been upgrading dependencies in my project, and it looks like one of the Google dependencies I'm importing (
google-cloud-logging
) puts duplicate classes/resources on the class path. Is there an elegant way to flag this as "OK" in my
3rdparty
build file for this library, or do I have to do
Duplicate.SKIP
in all of my bundle files for those duplicate classes/resources?
Copy code
===== For target JvmBinary(BuildFileAddress(src/jvm/com/.../graphql/bin/BUILD, bin)):
                   Duplicate classes and/or resources detected in artifacts: ('com.google.api.grpc-proto-google-cloud-logging-v2-0.82.0.jar', 'com.google.api.grpc-proto-google-common-protos-1.17.0.jar')
                        com/google/logging/type/HttpRequest$Builder.class
                        com/google/logging/type/LogSeverityProto.class
                        com/google/logging/type/HttpRequestProto$1.class
                        com/google/logging/type/HttpRequestProto.class
                        google/logging/type/http_request.proto
                        com/google/logging/type/HttpRequest$1.class
                        com/google/logging/type/LogSeverity.class
                        com/google/logging/type/HttpRequestOrBuilder.class
                        google/logging/type/log_severity.proto
                        com/google/logging/type/LogSeverityProto$1.class
                        ... 2 more ...
Both of those artifacts seem to be compile dependencies of https://mvnrepository.com/artifact/com.google.cloud/google-cloud-logging/1.99.0
Want to bump this to close the loop -- is
Duplicate.SKIP
my best option here?
h
cc @average-vr-56795 ^^ I don't know much about the JVM side alas
a
I’m also not sure… @witty-crayon-22786 or @wide-energy-11069 maybe? :)
w
@strong-caravan-64652: to silence that warning, you'd want to look at the help for that task
ie,
./pants help $task
for the "dupe checker" task. i forget what it is called. one sec.
(it's the scope rendered above what you pasted)
Copy code
$ ./pants help binary.dup
Scrubbed PYTHONPATH=/Users/stuhood/src/pants/src/python: from the environment.

binary.dup:
Detect JVM classes and resources with the same qualified name on the classpath.

  --binary-dup-exclude-dirs=<str> (--binary-dup-exclude-dirs=<str>) ..., --binary-dup-exclude-dirs="[<str>, <str>, ...]", --binary-dup-exclude-dirs="+[<str>, <str>, ...]" (default: ['META-INF/services'])
      Directory names to exclude from duplicate check.
  --binary-dup-exclude-files=<str> (--binary-dup-exclude-files=<str>) ..., --binary-dup-exclude-files="[<str>, <str>, ...]", --binary-dup-exclude-files="+[<str>, <str>, ...]" (default: ['.DS_Store','<http://cmdline.arg.info|cmdline.arg.info>.txt.1','dependencies','license','license.txt','notice','notice.txt'])
      Case insensitive filenames (without directory) to exclude from duplicate
      check.
  --binary-dup-exclude-patterns=<str> (--binary-dup-exclude-patterns=<str>) ..., --binary-dup-exclude-patterns="[<str>, <str>, ...]", --binary-dup-exclude-patterns="+[<str>, <str>, ...]" (default: ['^META-INF/[^/]+\.(SF|DSA|RSA)$'])
      Regular expressions matching paths (directory and filename) to exclude from
      the duplicate check.
it looks like we install two copies of the task which is a bit odd. so you might need to change the option for either
binary.dup
or
bundle.dup