-
Notifications
You must be signed in to change notification settings - Fork 278
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
//test:ScalaBinaryInGenrule fails with Bazel HEAD #280
Comments
Thanks!
Once Bazel 0.6 will be cut we'll update our code.
…On Tue, 26 Sep 2017 at 18:58 katre ***@***.***> wrote:
As of ***@***.***
<bazelbuild/bazel@655a529>,
java_common.create_provider requires the ctx.actions object to be passed as
the first argument. rules_scala needs to be updated (here at least:
https://github.com/bazelbuild/rules_scala/blob/85e154c541166877eb3fc6763ea1fde0da8a0139/scala/scala.bzl#L627)
to pass this.
Failure message:
$ bazel-dev build //test:ScalaBinaryInGenrule
...
ERROR: /usr/local/google/home/jcater/.cache/bazel/_bazel_jcater/3ab7d86a57881a7a5e9f250ec1d3fb5f/external/io_bazel_rules_scala/third_party/plugin/src/main/BUILD:5:1: in scala_library_for_plugin_bootstrapping rule @io_bazel_rules_scala//third_party/plugin/src/main:dependency_analyzer:
Traceback (most recent call last):
File "/usr/local/google/home/jcater/.cache/bazel/_bazel_jcater/3ab7d86a57881a7a5e9f250ec1d3fb5f/external/io_bazel_rules_scala/third_party/plugin/src/main/BUILD", line 5
scala_library_for_plugin_bootstrapping(name = 'dependency_analyzer')
File "/usr/local/google/home/jcater/.cache/bazel/_bazel_jcater/3ab7d86a57881a7a5e9f250ec1d3fb5f/external/io_bazel_rules_scala/scala/scala.bzl", line 661, in _scala_library_impl
_lib(ctx, True)
File "/usr/local/google/home/jcater/.cache/bazel/_bazel_jcater/3ab7d86a57881a7a5e9f250ec1d3fb5f/external/io_bazel_rules_scala/scala/scala.bzl", line 627, in _lib
java_common.create_provider(compile_time_jars = scalaattr.co..., <3 more arguments>)
In java_common.create_provider the value of use_ijar is True. Make sure the first argument of the function is the ctx.actions object.
WARNING: errors encountered while analyzing target '//test:ScalaBinaryInGenrule': it will not be built
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#280>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF_ZL2XkgQzPngMW2BBh9VSY8IFcLks5smR8rgaJpZM4PkfC2>
.
|
Ok. Please note that this is already failing on our CI system: http://ci.bazel.io/blue/organizations/jenkins/Global%2Frules_scala/detail/rules_scala/197/pipeline |
I think the API isn't available right now so if I make the change now I
break every user using our HEAD and using Bazel 0.5.4 right?
…On Tue, 26 Sep 2017 at 21:11 katre ***@***.***> wrote:
Ok. Please note that this is already failing on our CI system:
http://ci.bazel.io/blue/organizations/jenkins/Global%2Frules_scala/detail/rules_scala/197/pipeline
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#280 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIFyoF3TCmeFgYdYbqXOfQouxqL4EIks5smT5bgaJpZM4PkfC2>
.
|
If I'm reading this correctly, we can't support both 0.6.0 and 0.5.x with this change. Is this right? Is there any kind of macro of function we can use the |
@iirina, do you have any suggestions on how to be forward-compatible with this? |
We'll need to require 0.6 or maybe even 0.7 for full strict deps features.
…On Tue, 26 Sep 2017 at 21:14 P. Oscar Boykin ***@***.***> wrote:
If I'm reading this correctly, we can't support both 0.6.0 and 0.5.x with
this change.
Is this right?
Is there any kind of macro of function we can use the bzl file to switch
the call based on version? Not everyone is on the latest.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#280 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF3_BaFJ03GaA4P-AHEVI5qbnGwG6ks5smT77gaJpZM4PkfC2>
.
|
maybe what we should do is add a |
@johnynek I think this can reduce the velocity of adding new features and given our current |
This sounds like a good plan to me. But I might propose something else: version along with bazel. So rules_scala 0.8.0 is the first version that works with bazel 0.8.0, 0.8.1 the next. Since bazel seems to be making a plan to keep stable for any fixed 0.x for all y 0.x.y, this might make it easier for users. As far as 1.0 features, I think we are basically there. I would like to be able to pick what version of scala to use and at least support 2.11 and 2.12 dynamically (by config rather than by branch). I would also like to close #256. But other than that we have:
This seems like actually a pretty good menu. I'm not even sure what we should add beyond that? A rule to autogenerate build files using zinc would be really cool to allow people to easily factor targets that are taking too long, but I don't see that as a 1.0 showstopper. |
I don't understand how the above plan accounts for breaking changes by us. Re 1.0 features I definitely agree about 2.11/2.12 (I'd actually like scala_toolchain support but since I can't see us working on it I don't want to block on it). |
I would argue we don't make breaking changes without pairing it with a new bazel version. This will make it somewhat simpler for users to deal with. My concern is that compatibility matrices get really challenging for people to keep track of. Additionally, I think our users should generally not have to care about most of the internal workings of the rule. I think then interface we present should be very stable and shouldn't break builds. What kind of changes do you envision wanting to make that would break builds? |
I'm not sure but we did some breaking changes w.r.t jvm_flags and the sorts. |
I'm getting the same error mentioned above after upgrading to 0.7.0 -- I am using the latest version of the rules. Adding |
Oscar, I'm going to make the change and require 0.7 as the minimum |
@ittaiz I thought that some Google’s made a PR that dynamically checked the existence of some methods and fixed it? In any case, we can move to 0.7. We use java providers pretty heavily so we should be on the latest. Maybe it can help us fix things with intellij. |
They fixed a different problem with protobuf.
Great.
Unfortunately they're planning a few more API breaks. I'm trying to make
sure they happen as soon as possible
…On Thu, 19 Oct 2017 at 19:26 P. Oscar Boykin ***@***.***> wrote:
@ittaiz <https://github.com/ittaiz> I thought that some Google’s made a
PR that dynamically checked the existence of some methods and fixed it?
In any case, we can move to 0.7. We use java providers pretty heavily so
we should be on the latest. Maybe it can help us fix things with intellij.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#280 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF7eKcyFF0btjFDmVrYy0E19Fkhd_ks5st3grgaJpZM4PkfC2>
.
|
As of bazelbuild/bazel@655a529, java_common.create_provider requires the ctx.actions object to be passed as the first argument. rules_scala needs to be updated (here at least:
rules_scala/scala/scala.bzl
Line 627 in 85e154c
Failure message:
The text was updated successfully, but these errors were encountered: