-
Notifications
You must be signed in to change notification settings - Fork 124
Add support for Scala 2.12.0 #258
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
.travis.yml
Outdated
| include: | ||
| - scala: 2.10.6 | ||
| script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest test mimaReportBinaryIssues | ||
| script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues" |
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.
why the 3 +++? I thought it was just ++?
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 hook up the sbt-doge plugin to ensure that the overridden crossScalaVersions is respected. Without this I still get the error in the 3 projects we want to skip. I think we've done something similar in: twitter/chill#253
Current coverage is 65.21% (diff: 100%)@@ develop #258 diff @@
==========================================
Files 50 43 -7
Lines 1397 1259 -138
Methods 1347 1214 -133
Messages 0 0
Branches 50 45 -5
==========================================
- Hits 924 821 -103
+ Misses 473 438 -35
Partials 0 0
|
|
FWIW, |
|
@clhodapp ah you're right. Just tried running it and it seems to work. I can update to turn it back on. |
clhodapp
left a comment
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.
Nothing here stands out as crazy
|
If we turn on coverage by default doesn't that dramatically slow down the local tests? |
|
@johnynek looking at the build time in travis - https://travis-ci.org/twitter/bijection/builds/179597059 |
|
you should not need to do coverage for more than one version of scala, since it is the same code, right? I think just picking one version "the main one", whatever we consider that to be, should work. |
|
@johnynek yes, running coverage on one version should suffice. I wasn't able to figure out how to enable coverage via the command line using sbt. Was running into an error: Can check if there's an issue running the sbt-coverage plugin with the sbt-doge |
|
@johnynek ok not 100% sure what the best way to proceed on this is. Here's what I see. When I set up coverageEnabled conditionally: I still end up with coverage running in 2.12.0: Seems like our default setting of scalaVersion = 2.11.8 is ensuring that this can't be updated even if we try to pass it with This shows up even in the sbt console: Now if I comment out the line in build.sbt setting Seems like this problem is present even currently. We are checking scalaVersion to set scalacOptions - https://github.com/twitter/bijection/blob/develop/build.sbt#L26. When I tested this out on the sbt command line, it seems like we're always setting the options for 2.11. My proposal is to remove the line setting |
|
What if you move the setting for |
build.sbt
Outdated
| scalaVersion := "2.11.8", | ||
| javacOptions ++= Seq("-source", "1.6", "-target", "1.6"), | ||
| javacOptions in doc := Seq("-source", "1.6"), | ||
| coverageEnabled := true, |
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 need to enable this in the build? Can't we do +++$TRAVIS_SCALA_VERSION coverage test or something?
What is it about this change that is requiring us to always do coverage?
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.
That's a good point. As a dev just trying to see if you broke the tests, you probably wouldn't want coverage to run anyway.
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 so I originally tried to do that. The +++$TRAVIS_SCALA_VERSION coverage command doesn't work with the sbt-doge plugin for some reason (see above): #258 (comment)
I needed to pull in the sbt-doge plugin cause I wanted to ensure that bijection-scrooge, bijectionUtil and bijectionFinagleMySql can override the cross-scala versions to skip 2.12 as we don't have the finagle artifacts. Based on searching that seemed to be the best option to skip modules selectively for a given scala version. If you folks know of a better alternative, I could try that and drop the doge plugin.
|
@clhodapp / @johnynek - made some updates, now code coverage is enabled only on 2.11. Some of the pain is related to sbt-doge which doesn't seem to have been working with the |
|
Not setting a build-level scala version breaks tools like ensime. Could you try moving just |
|
@clhodapp so I tried setting the scalaVersion like you specified and renaming. Seems like that doesn't end up compiling to 2.12. So the version ends up staying at 2.11.8 even though we specify +++2.12.0. |
|
Bleh. OK. I give up then haha. With your PR as-is, bijection is no worse off in any way than it was a few days ago, so it seems reasonable. Once you remove |
|
Yeah, I guess that's fine. It's a bummer to make the tests always slow, but
I guess doge is incompatible with coverage somehow.
…On Tue, Nov 29, 2016 at 17:21 Chris Hodapp ***@***.***> wrote:
Bleh. OK. I give up then haha. With your PR as-is, bijection is no worse
off in any way than it was a few days ago, so it seems reasonable. Once you
remove doge
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#258 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEJdkE4pphERcNgZ1anOWTaIFsXv4iOks5rDOu9gaJpZM4K-QaC>
.
|
| include: | ||
| - scala: 2.10.6 | ||
| script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest test mimaReportBinaryIssues | ||
| script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues" |
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.
one last thing - do we want this binary check for 2.10 as well? In algebird we only check the 2.11 build.
|
Other than my one comment, 👍 ! |
|
Actually good point @sritchie but I do think we want to check binary compat in all versions. For instance, the rules in scala 2.12 are different than 2.11 (more changes should be binary compatible due to java 8 features being used). Scala 2.10 and 2.11 might be the same or close, but just to be sure it seems like a good idea to run on all supported versions. |
|
Thanks everyone! Will watch for a release. |
|
@stuhood bijection is out! 0.9.4 should get you going. We're working on algebird now. |
Building on #257. Adding 2.12.0 as a cross version to include. Had to disable building 2.12 for a few projects as they require some finagle 2.12 artifacts (which in turn requires bijection-core 2.12). Once the finagle artifacts are in, we can reenable those projects.