-
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
Migrate jar dependencies of tests from maven_jar to jvm_maven_import_external #871
Conversation
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'm personally -1 on this.
I'd rather use http_jar
(a custom implementation in this repo is only a few lines) and just point to the locations rather than add another dependency under all our users.
Secondly, the usability of pointing to paths with full URLs in them seems bad to me.
Lastly, the regression of including the scala version in the targets, I think will at least create large diffs when we do upgrades, and may significantly complicate things (e.g. it becomes easier to have 2_11 and 2_12 on the classpath, which creates very hard to debug errors for most users).
test/BUILD
Outdated
@@ -63,7 +63,7 @@ scala_binary( | |||
scala_library( | |||
name = "HelloLib", | |||
srcs = ["HelloLib.scala"], | |||
plugins = ["@org_psywerx_hairyfotr__linter//jar"], | |||
plugins = ["@maven//:org_psywerx_hairyfotr_linter_2_11"], |
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'm still bummed you all didn't find an injective naming scheme. This can collide if you have org.bar:foo.baz
and org.bar.foo:baz
. That's a shame. The extra _
was to separate the org from the group.
Next, since you all are baking the scala version 2_11
into the targets people use, this will mean upgrading a repo will be a pretty major pain. It may be that every string ending in _2_11"
can be converted to _2_12"
but previously, we wouldn't have that giant diff. This is a regression in usability for scala users.
"@com_google_guava_guava_21_0_with_file//jar:file", | ||
"@org_apache_commons_commons_lang_3_5//jar:file", | ||
"@maven//:v1/https/jcenter.bintray.com/com/google/guava/guava/21.0/guava-21.0.jar", | ||
"@maven//:v1/https/jcenter.bintray.com/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar", |
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.
do we really need to use the source of the binary in the name? What about users that use private internal resolvers?
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.
Filed bazel-contrib/rules_jvm_external#284
There's currently the ability to reference maven_install artifacts with the //jar
-style labels with generate_compat_repositories
, but we didn't implement the file
label. We can definitely do that - will look into it very soon.
I'm a fan of rules_scala either adopting the bazelbuild sanctioned third party jvm deps solution (rules_jvm_external) or contributing to it, such that it works for bazelbuild/rules_scala. I'm personally +1 on moving to rules_jvm_external as we've been using rules_jvm_external for several months internally and our open source projects and it's been working well for us. |
I like how easy to use I am personally +1 to this and excited to see |
I'm sorry I responded to the review. @jin I'm no longer involved with the project so perhaps you want to disregard my opinion. I'll remove my name and unsubscribe from the notifications. |
Hi, |
@johnynek thanks for the review! Very good comments and issues raised. These are definitely things that we can fix upstream in rules_jvm_external. @ittaiz what about maven_install makes you feel that it's only meant for small builds? Certainly, I can see how that's the case if you use it without artifact pinning / maven_install.json. I don't mind replacing rules_jvm_external with jvm_import_external in this PR. The goal is to move away from maven_jar, anyway. |
Any update on this? |
I've switched |
I see. It's sad to see |
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.
Thanks a lot for this @jin!
@jin regarding rules_jvm_external this is a long discussion which I don't have the capacity to have right now, sorry. Late responding to this PR wasn't me trying to make a point but rather a pure capacity and prioritization issue (whatever time I have I try to put into the phases PR). Hopefully we'll be able to talk about it at BazelCon :) |
lastly the build is failing. I've checked out the branch and am trying to fix the tests |
just to update, I was able to get past the failures in travis but got stuck on other failures and ran out of time. Will try to find more time as soon as I can |
@ittaiz I'm adding the Unfortunately this will only land in Bazel 2.0. Perhaps we can extract the Starlark rules out to rules_jvm_external to decouple release processes. I'll open another PR as soon as we have a jvm_maven_import_external that's API compatible to migrate rules_scala. |
Thanks!
Is it only for us or are others having a harder time to migrate? If it’s
only for us please don’t add it.
I’ll fix the tests here.
On Thu, 28 Nov 2019 at 0:39 Jin ***@***.***> wrote:
Closed #871 <#871>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#871?email_source=notifications&email_token=AAKQQF7ZTE4RZBA4T5WHUALQV3ZJXA5CNFSM4JIWGFH2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVEOBXDY#event-2837191567>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQQFZX6S3TAP6VWF3X4S3QV3ZJXANCNFSM4JIWGFHQ>
.
--
*Ittai Zeidman*
Cell: 054-6735021
40 Hanamal street, Tel Aviv, Israel
<http://www.wix.com>
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Argh, my local git tree is so messed up. I'll make another PR.
Your use case is fairly common, so I think it's a good idea to add it. |
I always prefer having less work so I won’t argue too much but I’ll just
add that I think we used this pattern before we had the generic
jvm_import_external and in many ways exposing the raw file is redundant
since it widens the API.
If people have other use cases then maybe you’re right
On Thu, 28 Nov 2019 at 6:56 Jin ***@***.***> wrote:
Closed #871 <#871>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#871?email_source=notifications&email_token=AAKQQF2SQO3L3T7B4QLEPJLQV5FO7A5CNFSM4JIWGFH2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVERYSHQ#event-2837678366>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQQF7RPLBOQ7RQIF46L5TQV5FO7ANCNFSM4JIWGFHQ>
.
--
*Ittai Zeidman*
Cell: 054-6735021
40 Hanamal street, Tel Aviv, Israel
<http://www.wix.com>
|
…rt_external This adds compatibility between maven_jar and the Starlark rules' API, and helps with migration from maven_jar as seen in bazelbuild/rules_scala#871 Closes #10324. PiperOrigin-RevId: 282930614
Description
This pull request converts all maven_jar usages to jvm_maven_import_external.
See bazelbuild/bazel#6799 for more information about
maven_jar
's removal.Motivation
maven_jar
is planned for removal in Bazel 2.0.