I'm trying to do both java and scala codegen from ...
# general
I'm trying to do both java and scala codegen from thrift files. I have specified separate namespaces for each language. With the java codegen backend alone,
produces the java: dist/codegen/src/thrift/thrift_example/thriftjava/Person.java but with both java and scala enabled, it produces only the scala: dist/codegen/src/thrift/thrift_example/thriftscala/Person.scala https://github.com/mgedigian-etsy/pants-jvm-codegen/compare/codegen?expand=1
I am also wondering how to specify the scala and thrift codegen as dependencies of other targets. If I list the "/src/thrift:thrift", I get a
error. Do they have separate identifiers I can reference? Or is there a way to explicitly define separate targets in order to obtain separate identifiers?
Copy code
./pants check src/jvm/org/pantsbuild/example/lib
13:49:13.85 [ERROR] 1 Exception encountered:

  ClasspathSourceAmbiguity: More than one JVM classpath provider (CompileJavaSourceRequest, CompileScalaSourceRequest, CoursierFetchRequest, DeployJarClasspathEntryRequest, JvmResourcesRequest) was compatible with the inputs:
  * src/thrift:thrift (thrift_sources)
hm @fast-nail-55400 I remember you and I were thinking about this a few months ago, but don't remember exactly where we landed. Do you?
It is a case like this that made me favor separate explicit targets to represent codegen outputs (e.g.,
to represent the Java output from generating Java from Protobuf sources).
There was a bunch of discussion on how we would provide a way to select which sources are produced.
I don't recall a resolution of the discussion other than to not resolve at that time.