Skip to content
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

Move to Scala 2.12 #155

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

jpolchlo
Copy link
Contributor

Overview

This PR updates the scala version to 2.12 and any required dependencies to enable this upgrade.

Checklist

  • Add entry to CHANGELOG.md

@jpolchlo
Copy link
Contributor Author

CircleCI was fighting me on this. I believe it was failing to properly load paradise macros, and giving a misleading compiler error as a result:

[error] argument expression's type is not compatible with formal parameter type;
[error]  found   : java.util.function.Function[String,Map[String,vectorpipe.sources.AugmentedDiffSource.RF]]
[error]     (which expands to)  java.util.function.Function[String,Map[String,vectorpipe.util.RobustFeature[org.locationtech.jts.geom.Geometry,vectorpipe.model.ElementWithSequence]]]
[error]  required: java.util.function.Function[_ >: String, _ <: ?R]
[error] Note: String <: Any, but Java-defined trait Function is invariant in type T.
[error] You may wish to investigate a wildcard type such as `_ <: Any`. (SLS 3.2.10)
[error]         .map { line =>
[error]          ^
[error] /home/circleci/project/src/main/scala/vectorpipe/sources/AugmentedDiffSource.scala:67:21: type mismatch;
[error]  found   : java.util.function.Function[String,Map[String,vectorpipe.sources.AugmentedDiffSource.RF]]
[error]     (which expands to)  java.util.function.Function[String,Map[String,vectorpipe.util.RobustFeature[org.locationtech.jts.geom.Geometry,vectorpipe.model.ElementWithSequence]]]
[error]  required: java.util.function.Function[_ >: String, _ <: R]
[error]         .map { line =>
[error]                     ^
[error] /home/circleci/project/src/main/scala/vectorpipe/sources/AugmentedDiffSource.scala:74:10: value toSeq is not a member of java.util.stream.Stream[R]
[error] possible cause: maybe a semicolon is missing before `value toSeq'?
[error]         .toSeq
[error]          ^

However, I could not reproduce the error anywhere else, and paradise macros were included properly. (I later discovered these same errors while trying to streamline the build.sbt after removing paradise.)

It may have been possible to make circle work, but I opted to move to Github actions for CI and deployment, following the template provided by locationtech/geotrellis#3440. The setup is similar to Circle, and doesn't require integration with an external service.

@jpolchlo
Copy link
Contributor Author

I believe that this PR is stalled for the moment because moving to GT 3.7 is going to require an upgrade to Spark 3, which means that the data sources will need to be updated to use the V3 spark SQL data source API. This will require some amount of fuss, which we don't have time for at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant