-
Notifications
You must be signed in to change notification settings - Fork 29k
SPARK-4375. no longer require -Pscala-2.10 #3239
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
Conversation
|
Test build #23302 has started for PR 3239 at commit
|
|
@sryza I was assuming that we create profile for kafka only and not other submodules. |
|
Right, this was before we came to that decision. Will update this to just do Kafka. |
|
Test build #23302 has finished for PR 3239 at commit
|
|
Test PASSed. |
ea056ce to
fc9c305
Compare
|
Test build #23307 has started for PR 3239 at commit
|
|
Test build #23308 has started for PR 3239 at commit
|
|
I had some additional conversation with @pwendell and we agreed that SPARK-4376 (putting external modules behind maven profiles) is worthwhile, so this PR implements both that and SPARK-4375. It's not 100% polished - it needs documentation and I'm still hitting random errors with scala-2.11 under certain conditions. To build assembly and not build any of the external modules or examples: To build assembly and one of the external modules: To build assembly and all external modules and examples: To build assembly with 2.11: To build assembly and one of the external modules with 2.11: To build assembly and all external modules and examples with 2.11 (except for Kafka, which doesn't work with 2.11): This patch removes the Algebird examples entirely, because they're fairly obscure, show off more Algebird functionality than Spark functionality, don't work with Scala 2.11, and would require extra profiles to support. To get the Scala-2.11 build to work, I needed to set all the artifact IDs to include the scala.binary.version instead of hardcode 2.10, which seems right to me unless I'm missing something? Not sure how this was working before. |
|
You mean you need the declared artifact IDs to include a property value? I thought that wasn't possible in Maven, which is what created a lot of the complication in the first place. Dependencies' artifact ID can include property values. |
|
I think Sean is right. Have half a fix for this but am going to go to bed now. |
|
Test build #23307 has finished for PR 3239 at commit
|
|
Test PASSed. |
|
Test build #23308 has finished for PR 3239 at commit
|
|
Test PASSed. |
|
@ScrapCodes @pwendell I just tried "mvn package -Pscala-2.11" without my patch and still got errors: Any idea what's going on there? |
|
@sryza could you change the PR title / description to be more informative? This change is big enough that it should have a good commit message. You last comment should be a good candidate for that commit message. I personally feel that the examples profile should be enabled by default, to keep the default build the same (and avoid people inadvertently not compiling that code). |
|
@sryza I think the artifact ID needs to be hard coded to work when we publish artifacts. If you want to change to scala 2.11 we have a script in ./dev that will re-write these. This is only really relevant if people are publishing artifacts. |
|
Test build #23319 has started for PR 3239 at commit
|
|
Test build #23321 has started for PR 3239 at commit
|
|
Test build #23319 has finished for PR 3239 at commit
|
|
Test PASSed. |
|
Test build #23321 has finished for PR 3239 at commit
|
|
Test PASSed. |
dev/create-release/create-release.sh
Outdated
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.
could you add this to binary releases also (below in this script).
88a2390 to
587f671
Compare
|
Here's a patch with a simpler approach that relies on @vanzin 's suggestion of a -Dscala-2.11 property. I still like the idea of putting the external projects and examples behind maven profiles, but we can do that in a separate PR. @pwendell if you think this is a good approach, I'll add some documentation. |
|
Test build #23339 has started for PR 3239 at commit
|
|
LGTM if Jenkins is happy. If you don't plan to address the "examples profile" thing, probably a good idea to update the PR's title. |
|
Test build #23339 has finished for PR 3239 at commit
|
|
Test PASSed. |
|
Hey Sandy - I think this looks good. I wasn't able to get it to succeed locally. but I think something is messed up with my local environment since even the master build isn't working. Could you add the relevant documentation? |
587f671 to
dfdb3d9
Compare
|
Updated the doc - it seems like there's actually not a ton more to say, but let me know if I missed anything. |
|
Test build #23355 has started for PR 3239 at commit
|
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 am not 100% sure if it will work with sbt as sbt/sbt -Dscala-2.11. Did you happen to try ?
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.
Yeah, that instruction only applies to maven. Do we try to make all the same options have the same effect? I could add a line under the sbt section that explains how to use sbt with Scala 2.11 (-Pscala-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.
IMO, it is okay to add an exception. We sort of decided on same flags for both build to simplify things for sbt users(and may be maven users too). Its okay for things we don't have choice and should not forfeit the purpose. I will let Patrick comment too.
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.
It also don't think it would be hard to make the sbt build support that property
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.
the SBT build could easily support this I think
|
Test build #23355 has finished for PR 3239 at commit
|
|
Test FAILed. |
dfdb3d9 to
0ffbe95
Compare
|
Jenkins, test this please. |
|
Test build #23377 has started for PR 3239 at commit
|
|
Test build #23377 has finished for PR 3239 at commit
|
|
Test PASSed. |
|
Looks good - I played with this locally. |
It seems like the winds might have moved away from this approach, but wanted to post the PR anyway because I got it working and to show what it would look like. Author: Sandy Ryza <sandy@cloudera.com> Closes #3239 from sryza/sandy-spark-4375 and squashes the following commits: 0ffbe95 [Sandy Ryza] Enable -Dscala-2.11 in sbt cd42d94 [Sandy Ryza] Update doc f6644c3 [Sandy Ryza] SPARK-4375 take 2 (cherry picked from commit f5f757e) Signed-off-by: Patrick Wendell <pwendell@gmail.com>
It seems like the winds might have moved away from this approach, but wanted to post the PR anyway because I got it working and to show what it would look like.