-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maven_jar forces ijar usage #990
Comments
Doesn't the maven_jar creates a //:file target that you can use? maven_jar wrap the jar in a java_import so yes it forces it. |
I don't see the file target. For example:
|
oh yeah it is not exported. Adding a filegroup would do the trick, no? On Thu, Mar 3, 2016 at 9:29 AM P. Oscar Boykin notifications@github.com
|
I think so, yes. |
I did a gerrit thing, I think? =) |
Fixes bazelbuild/bazel#990. It's sometimes useful to be able to access the file pulled down with maven_jar; for example, scala macro jars don't work with ijar, so it's necessary to pull them into the compile-time classpath unharmed. -- Change-Id: I1d9e1cb30ea6fa56c18cbfcc68ee9b203524dfd4 Reviewed-on: https://bazel-review.googlesource.com/#/c/3550 MOS_MIGRATED_REVID=121379551
When you add a maven_jar, it adds a java_import rule that exports the jar.
The problem is that in scala, macros are code in jars that is run at compile time. So, using ijar on them breaks compilation.
What we need is a way in maven_jar to control this.
One possibility is to add the ability to pass the BUILD to the rule, but to use this from java would mean solving #970
the work around now is to use http_file and special case handling that in the scala.bzl rules:
https://github.com/bazelbuild/rules_scala/blob/master/scala/scala.bzl#L185
The text was updated successfully, but these errors were encountered: