--
You received this message because you are subscribed to the Google Groups "Bazel/JVM Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-sig-jv...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOfK4wVFqF-KmiAvREKfRfbqNcu5_6Kvbh5jbS4OxABq-%3D%3DroQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks!
Would it be incorrect in the above cases (scala_import with jars and scala_library with Java jar and Scala jar) to have multiple JavaInfo instances and then merge them?
Sounds to me like if the output jar is only there for aspects ( and not for example to control compile deps) then it might be redundant to create many JavaInfo instances and then merge them but it should be correct.
Wdyt?On Wed, 13 Jun 2018 at 15:39 Lukács T. Berki <lbe...@google.com> wrote:You are probably confused by the concept "output jar", which is not a surprise, because it's a confusing concept :)JavaRuleOutputJarsProvider#getOutputJars() provides the jar produced by that particular rule *only*. It's there so that aspects (e.g. the one that converts .jar files to .dex files) can process each jar exactly once. java_import is a special case in that it produces multiple output jars.I think the right answer is to make it possible to create JavaRuleOutputJarsProvider instances from Skylark that have multiple output jars (AFAICS that's not possible right now) The right API, I'll defer to the Java folks I just added to this thread.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOfK4wWAGNCjqzhceDK9mFamUM-X0dGCeQsToF94dfHF%2B0Pn5g%40mail.gmail.com.
“That” being Lukacs’s suggestion?
If so does this mean my above suggestion is incorrect as a stopgap?
I see.
So currently it sounds like we’re blocked from moving to JavaInfo.
Anyone know what is the deprecation plan for the two existing constructors (java_common and the intermediate JavaInfo)?
Actually does anyone know *why* we allow java_import to include multiple jars? Ittai, why would your rule need that? I haven't come across the use case myself in the wild.
I think it would be nice to give Skylark rules the ability to "easily" produce multiple output Jars. Besides import-like rules, this would be useful for rules that "naturally" produce two Jars, as for instance the native android_library rule does. More generally, any rule that has multiple compile-like actions could take advantage. I'm not sure whether that's best done by supporting multiple output_jars in JavaInfo's constructor or another mechanism, but as I said I think it would be good to allow this especially given there are several native rules (java_import, android_library) that use this feature. It's also just confusing IMHO that the native providers support multiple Jars but JavaInfo doesn't.
On Wednesday, June 13, 2018 at 5:34:24 PM UTC-7, Liam Miller-Cushon wrote:On Wed, Jun 13, 2018 at 5:26 PM 'Tom Lundell' via Bazel/JVM Special Interest Group <bazel-...@googlegroups.com> wrote:Actually does anyone know *why* we allow java_import to include multiple jars? Ittai, why would your rule need that? I haven't come across the use case myself in the wild.Theoretically if we start enforcing strict deps for java_import, there could be cyclic references between two jars that would require putting them in the same import.Practically, I don't know of any reasons to support multiple jars today, but if support was removed we'd need more export-only java_library rules to aggregate related jars.Making java_import take a single jar would also solve #3651 (java_import has many jars and one srcjar).
--
You received this message because you are subscribed to the Google Groups "Bazel/JVM Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-sig-jv...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/ddb55888-255a-4bde-a2b3-ba3b8a4c9683%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAPvN2rWPA_qC0GT9da68WUzt5jG6HfF2EZr99v3BuySrVm1F3A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOfK4wWPKbUSGQHLh3j7i9FeYfMvejN-VjS8jrpkpPZZFRFqVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOu%2B0LVU-9ywPi9XM_ZU0yGjchADseSheNqsf%2BRZvJtkmEo%3DNg%40mail.gmail.com.
Hi, sorry for joining the party so late.I am reluctant about passing multiple output jars to a JavaInfo constructor, in any form. As Tom mentioned it is difficult to design such a constructor. The current status of JavaInfo reached a much cleaner version. The problem of getting the output jars after merging multiple providers can be solved by java_common.merge adding all the output jars to JavaRuleOutputJarsProvider instead of returning an empty one. This is also what java_import does so it's reasonable.When java_common.merge was created the java_common API was different and it introduced questions like "what does it really mean to merge these providers"? The question still persists. It's necessary to avoid just throwing jars at JavaInfo and aim for JavaInfo to have a meaning instead. The meaning is that JavaInfo encapsulates everything that is related to a compilation (output jar, ijar, dependencies that were used, etc) that resulted to a certain output jar
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOfK4wWpdZM1tmX%2BZnWQFdUag5noEsvoQ8URRhtYam3M_cjWsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/d9767d06-d088-4ca1-a982-e37d46457f8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It seems to me that neverlink is about *how* we construct runtime and compile time paths but does not need to be added to JavaInfo fields. Neverlink, as I understand, is when you put something on the compile time path, but not on the runtime path.Similarly with exports: exports are just JavaInfo objects you merge ino the output JavaInfo, no special handling needed.As far as I can see, we really only need compile time, runtime and transitive versions of these. I think we also have full_compile_time (and transitive) if we want to supply the full jars, but not sure why that is needed.I am not sure why we need JavaRuleOutputJars instead of just DefaultInfo. I’d like to know that.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAE6AC97k4V2Mxt%3D2k9DY1eMeP5kABFRumdwgrWpyZdK7o0Brmg%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Bazel/JVM Special Interest Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bazel-sig-jvm/THl2DRqyYW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bazel-sig-jv...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAPvN2rV%2B_%3D%2BzJ_1bqbdSHmtwpc1nUb__odKCynUZgNdnwuH72A%40mail.gmail.com.
Maybe Irina can also share the original design doc that moved us to more semantic meaning.
I have to say I disagree. This is one possible meaning which honesty I think is wrong. JavaInfo is a provider which aims to convey information about a target, not about specific actions of the rule.
you’re suggesting to fix java_common.merge so that it will expose the output jars of the underlying JavaInfo instances?
Additionally are there more elements merge “‘messes” up? Are exports preserved?
You received this message because you are subscribed to a topic in the Google Groups "Bazel/JVM Special Interest Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bazel-sig-jvm/THl2DRqyYW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bazel-sig-jv...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/3c821c72-4cbe-4623-b022-8deebfc30627%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAFRCsYTp%3D-%2B7RCyE1xbg1W7_Ve6CwPMwa1_rSRuEWLJyx2gQUw%40mail.gmail.com.