-
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
Add scala-xml and scala-parser-combinators jars individually #549
Add scala-xml and scala-parser-combinators jars individually #549
Conversation
- Update aspect test with new labels
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
@jhnj you need to sign the CLA. Stripe has already done it for all of stripe. If you use your stripe account, it should work, or I think you can personally sign. |
scala/scala.bzl
Outdated
jars = ["lib/scala-parser-combinators_2.11-1.0.4.jar"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
java_import( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we kill the whole use of the sdk and just use jars? I think that might be the way to go so we can just use maven servers for all dependencies (or git repos I guess).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see why we couldn't, I'll update the PR after lunch
I'll sign the cla individually. Decided to use my personal account as I won't have access to the stripe one after the summer |
I signed it! |
CLAs look good, thanks! |
@johnynek Updated the PR. One question though, currently using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to http_file + scala_import and I am +1
scala/scala.bzl
Outdated
url = | ||
"http://central.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar", | ||
sha256 = "0dfaafce29a9a245b0a9180ec2c1073d2bd8f0330f03a9f1f6a74d1bc83f62d6" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to use http_file
then scala_import
them because they could in principle have macros inside, so we don't want to use ijar.
Please just use scala_import_external or better yet
scala_maven_import_external
They do the same but in a cleaner and more semantic fashion
…On Fri, 29 Jun 2018 at 0:36 P. Oscar Boykin ***@***.***> wrote:
***@***.**** commented on this pull request.
move to http_file + scala_import and I am +1
------------------------------
In scala/scala.bzl
<#549 (comment)>
:
> @@ -300,6 +278,18 @@ def scala_repositories():
sha256 =
"f198967436a5e7a69cfd182902adcfbcb9f2e41b349e1a5c8881a2407f615962",
)
+ native.http_jar(
+ name = "scala_xml",
+ url =
+ "http://central.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.5/scala-xml_2.11-1.0.5.jar",
+ sha256 = "767e11f33eddcd506980f0ff213f9d553a6a21802e3be1330345f62f7ee3d50f"
+ )
+ native.http_jar(
+ name = "scala_parser_combinators",
+ url =
+ "http://central.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar",
+ sha256 = "0dfaafce29a9a245b0a9180ec2c1073d2bd8f0330f03a9f1f6a74d1bc83f62d6"
+ )
I think we need to use http_file then scala_import them because they
could in principle have macros inside, so we don't want to use ijar.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#549 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF9htHGRNyNh0vnrSgQfFun_GGcH8ks5uBUxGgaJpZM4U7562>
.
|
can you look at the CI failures? seems like you still have some |
@johnynek Updated now with |
Not sure what the CI failures where, didn't get those errors locally. We'll see if the new commits pass |
@johnynek Could you take a look at the CI errors, can't figure out why it's failing.
|
@jhnj I see:
failing. Does that work for you? |
@johnynek Doesn't work,
(and the same with //external:io_bazel_rules_scala/dependency/scala/scala_library) |
|
@ittaiz any tips? I have not really kept up with the state of these import rules. |
I’ll take a look later today
…On Fri, 29 Jun 2018 at 4:25 P. Oscar Boykin ***@***.***> wrote:
@ittaiz <https://github.com/ittaiz> any tips? I have not really kept up
with the state of these import rules.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#549 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF5e7ySrBdsX_PV-GcBZN2OD5UCFQks5uBYIcgaJpZM4U7562>
.
|
I think, but haven’t confirmed it yet, that it’s because scala import doesn’t return the files in the DefaultInfo provider. Third time we’re stublin onto this but each time it’s part of a bigger PR so it doesn’t get fixed. I’ll see if I can send a small PR just for this. @jhnj if you’re blocked by it you can also pick it up |
I'll try to make a PR today if I have the time |
Cherry-picked commit from #550 |
scala/scala.bzl
Outdated
visibility = ["//visibility:public"], | ||
) | ||
""" | ||
|
||
def scala_repositories(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make server URLs maven_servers as a parameter and default to a single list with maven central?
scala/scala.bzl
Outdated
) | ||
|
||
_scala_maven_import_external( | ||
name = "scala_xml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names are pretty short. Since they have to be globally unique what about io_bazel_rules_scala_scala_xml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn’t this contradict canonical naming? Why do you think here we should preface with rules_scala?
Not sure I disagree btw, trying to gather my thoughts about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t own the global namespace. So who is to say someone else didn’t point scala_xml at something else. If you prefix with io_bazel_rules_scala I think you are asking for it. I think we can argue that we do own that namespace. If we could solve the problem of a canonical maven encoding, this could be a solved problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 on having longer names. Don't have strong opinions on whether it should be io_bazel_rules_scala_scala_xml
or e.g. org_scala_lang_modules_scala_xml
As part of a larger PR (#544) for adding support for selecting scala versions I separated
scala-xml
andscala-parser-combinators
to be imported individually usingnative.http_jar
. @johnynek suggested making o separate PR for this smaller change so here it is.The motivation behind the change is that the versions of
scala-xml
andscala-parser-combinators
that are downloaded as part of the main{scala_version}.tgz
differ between minor scala versions and this way we can select specific versions (#544 would allow users to select any 2.11/2.12 minor version)