gifted-autumn-88099
02/28/2018, 9:21 PMSimpleCodegenTask copies the provides parameter from the concrete target to the synthetic target, resulting in two targets that provide the same artifact. I found this while attempting to publish a java_thrifty_library, but also verified the same issue happens when attempting to publish a java_wire_library.
When creating the synthetic target, should the provides parameter be moved to the synthetic target?gifted-autumn-88099
02/28/2018, 9:22 PMjava_wire_library says:
FAILURE: Multiple targets define the same artifacts!
org.pantsbuild.contrib.thrifty#wire is defined by:
.pants.d/gen/wire/252d64521cf9/contrib.thrifty.tests.thrift.org.pantsbuild.contrib.thrifty.common.wire/current:contrib.thrifty.tests.thrift.org.pantsbuild.contrib.thrifty.common.wire
contrib/thrifty/tests/thrift/org/pantsbuild/contrib/thrifty/common:wireenough-analyst-54434
02/28/2018, 9:53 PMwitty-crayon-22786
02/28/2018, 11:13 PMwitty-crayon-22786
02/28/2018, 11:14 PMjava_thrift_library is explicitly skipped in publishing or somethinggifted-autumn-88099
02/28/2018, 11:45 PMjava_thrift_library uses a different code path.
What do you think about the idea of moving the provides from the concrete target to the synthetic target? Or have another idea? I’d like to publish these thrifty jars and can take a look.witty-crayon-22786
02/28/2018, 11:56 PMwitty-crayon-22786
02/28/2018, 11:56 PMjava_thrift_library ?witty-crayon-22786
03/01/2018, 12:01 AMjava_thrift_library succeeds there, but i don't think it has anything to do with mutationwitty-crayon-22786
03/01/2018, 12:02 AM@staticmethod
def _is_exported(target):
return isinstance(target, ExportableJvmLibrary) and target.providesgifted-autumn-88099
03/01/2018, 12:33 AMgifted-autumn-88099
03/01/2018, 12:39 AMJavaThriftyLibrary subclasses ExportableJvmLibrary, when in fact it’t not exportable. Trying this outwitty-crayon-22786
03/01/2018, 12:39 AMwitty-crayon-22786
03/01/2018, 12:39 AMgifted-autumn-88099
03/01/2018, 12:40 AM$ git grep -h ExportableJvmLibrary | grep class
class JaxWsLibrary(ExportableJvmLibrary):
class JavaThriftyLibrary(ExportableJvmLibrary):
class JavaWireLibrary(ExportableJvmLibrary):
class AnnotationProcessor(ExportableJvmLibrary):
class ExportableJvmLibrary(JvmTarget):
class JavaLibrary(ExportableJvmLibrary):
class ScalaLibrary(ExportableJvmLibrary):witty-crayon-22786
03/01/2018, 12:41 AMgifted-autumn-88099
03/01/2018, 12:41 AMwitty-crayon-22786
03/01/2018, 12:42 AMwitty-crayon-22786
03/01/2018, 12:42 AMwitty-crayon-22786
03/01/2018, 12:42 AMgifted-autumn-88099
03/01/2018, 12:50 AM