fast-nail-55400
09/16/2021, 7:16 PMjvm_dependency , jvm_requirement, jar_requirement, java_jar_requirement, jvm_jar_requirement, or some other name?fast-nail-55400
09/16/2021, 7:16 PMhundreds-father-404
09/16/2021, 7:59 PMhundreds-father-404
09/16/2021, 8:00 PMcoursier_requirement possibly work?fast-nail-55400
09/16/2021, 10:18 PMhundreds-father-404
09/16/2021, 10:20 PMjvm_requirement, you mentioned in the ticket that you would have a distinct scala_requirement. Can you share more about that? And if you've thought about other JVM languages like Kotlin?loud-stone-83419
09/16/2021, 10:20 PMjvm_dependency that it would be reused by scala_dependency hence why it is more "general"? if so I believe that makes sense since someone with experience in scala could use the jvm_dependency and manually add the version suffix.hundreds-father-404
09/16/2021, 10:25 PMscala_requirement generates jvm_requirement using the new target generation stuff? And you can also manually declare the jvm_requirement if you want? I could imagine something like sbt_requirements to parse an SBT config and generate jvm_requirement targets
(@loud-stone-83419 not sure if you've seen that target gen stuff. tl;dr: we realized this week that Pants can be a lot more conceptually clear if we have distinct targets for the "atoms" of builds like java_test, jvm_requirement. And then separately targets for the sake of boilerplate reduction, like sbt_requirements and java_tests, which generate the atomic targets)fast-nail-55400
09/16/2021, 10:27 PMscala_dependency would just override artifact and append the version suffix but users could still use the base form directly and append it themselvesfast-nail-55400
09/16/2021, 10:27 PMfast-nail-55400
09/16/2021, 10:28 PMfast-nail-55400
09/16/2021, 10:28 PMscala_artifactfast-nail-55400
09/16/2021, 10:28 PMjvm_artifact and scala_artifact ?fast-nail-55400
09/16/2021, 10:29 PMscala_artifact would use the Target API to just override the artifact field. and with a properly-defined FieldSet , the JVM resolve code wouldn’t care about the differencehundreds-father-404
09/16/2021, 10:31 PMjvm_artifact is the underlying atom. That makes sense to me.
Do you know if that generalizes to other JVM languages like Kotlin? (I'm being lazy not looking, can if that's helpful.) cc @ancient-vegetable-10556ancient-vegetable-10556
09/16/2021, 10:46 PMancient-vegetable-10556
09/16/2021, 10:49 PMjava_artifact but you would probably need a special scala_artifact, if that makes sense?hundreds-father-404
09/16/2021, 10:56 PMscala_artifact is adding for you the specialized runtime dep automatically? Under-the-hood, it is still a jvm_artifact?fast-nail-55400
09/16/2021, 10:57 PMfast-nail-55400
09/16/2021, 10:58 PMScalaArtifact extended Artifact so was the “same”fast-nail-55400
09/16/2021, 10:58 PMFieldSet to gather the fieldshundreds-father-404
09/16/2021, 10:59 PMjvm_artifact, what would happen if a scala_source target depends on a jvm_artifact. Or if you need it to depend on a scala_artifact and jvm_artifact doesn't work.
In other words, does scala_artifact simply generate a jvm_artifact for you to cut down on boilerplate, or is it fundamentally a different thingfast-nail-55400
09/16/2021, 11:00 PMfast-nail-55400
09/16/2021, 11:00 PMscala_artifact is just a target with the same 3 fields as jvm_artifact except it uses a custom field subclass for the artifact fieldfast-nail-55400
09/16/2021, 11:00 PMfast-nail-55400
09/16/2021, 11:01 PMhundreds-father-404
09/16/2021, 11:02 PMfast-nail-55400
09/16/2021, 11:04 PMjvm_artifact and scala_artifactfast-nail-55400
09/16/2021, 11:04 PMscala_artifact is a name from v1 tooenough-analyst-54434
09/17/2021, 3:31 AMorg:name-<scala-rev-1>:ver and org:name-<scala-rev-2>:ver If you were supporting more than 1 scala rev for the same artifact. Then Java started moving fast and breaking things and so now, since java 9 you can embed multiple classfiles per input sourcefile to target multiple JVMs at once: https://openjdk.java.net/jeps/238