-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Switch to Scala 2.12.7 #4062
Switch to Scala 2.12.7 #4062
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.
LGTM
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 doing this, got one minor nit which I think should be addressed though.
f.onSuccess({ | ||
case _ => transid.finished(this, start, s"[PUT] '$dbName' completed document: '$docinfoStr'") | ||
}) | ||
f.foreach(_ => transid.finished(this, start, s"[PUT] '$dbName' completed document: '$docinfoStr'")) |
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 use onComplete
everywhere there's the success/failure case?
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.
Done
Compilation time for whole project via reduced from 2 min 39 sec to 1 min 46 sec, thus a 33% improvement !!
|
Codecov Report
@@ Coverage Diff @@
## master #4062 +/- ##
==========================================
+ Coverage 76.63% 81.14% +4.51%
==========================================
Files 148 148
Lines 7249 7113 -136
Branches 445 439 -6
==========================================
+ Hits 5555 5772 +217
+ Misses 1694 1341 -353
Continue to review full report at Codecov.
|
Before we merge this to master we need to have PR for all other OpenWhisk repo relying on core repo and then coordinate the merge across all those repos |
Created 16 PR 😰 and no code change needed in other repos. Of 16 build is failing for 4 for reasons not related to this change. Once this PR is merged those 16 PR would need to be updated to point to latest master and then merged |
Kudos @chetanmeh this is a lot of repetitive work. Thanks a ton for pulling through! |
@csantanapr I have reverted all git branch change from various PR. So all PR now only have required changes for Scala 2.12 support. |
In IBM we did some refactoring in our internal repos and public repos for this and we are ready for the Scala bump. |
The conflict needs to be resolved before we can start the merge fest. |
Change all scala based libs to 2.12
Post rebase the invoker is throwing exception at runtime
Strangely compilation passes fine. The Seems like this was changed in #4041 and may be a bug in Scala compiler. Needs further investigation |
The issue can be seen with this fiddle. It passes with 2.11 but fails with 2.12. Probably related to scala/bug#10477 |
@@ -75,8 +75,8 @@ object ActivationMessage extends DefaultJsonProtocol { | |||
* Message that is sent from the invoker to the controller after action is completed or after slot is free again for | |||
* new actions. | |||
*/ | |||
abstract class AcknowledegmentMessage() extends Message { | |||
override val transid: TransactionId | |||
abstract class AcknowledegmentMessage(private val tid: TransactionId) extends Message { |
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.
Had to change code here to workaround Scala compiler bug (see previous comments)
cc @cbickel
@csantanapr The PR is green now. So we can now do the merge |
thanks @chetanmeh 👍 |
Thanks @csantanapr for taking care of merge and changes in all other repos |
Updates the Scala compiler and library to 2.12.7
Description
Apart from switching the jar versions to 2.12 some code changes were required to avoid use of now deprecated features.
Related issue and scope
My changes affect the following components
Types of changes
Checklist: