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

WIP: Cross-compile with 2.13 #3346

Closed

Conversation

philvarner
Copy link
Contributor

Overview

These changes allow cross-compilation between 2.11, 2.12, and 2.13.

Packages that depend on 2.13 support from Spark 3.2 (not yet release) will obviously not compile (or even update). For package that do not depend on Spark (e.g., raster, vector), 2.13 does not correctly build yet, as there are ~10 minor code changes that need to be made to allow that. The only issue that is currently a blocker is in raster, the implicits interpolation.Implicits, summary.Implicits, and summary.polygonal.Implicits, can't be found.

Checklist

  • ./CHANGELOG.md updated, if necessary. Link to the issue if closed, otherwise the PR.
  • Module Hierarchy updated, if necessary
  • docs guides update, if necessary
  • New user API has useful Scaladoc strings
  • Unit tests added for bug-fix or new feature

Demo

Optional. Screenshots/REPL

Notes

Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.

Closes #XXX

build.sbt Outdated
ThisBuild / organization := "org.locationtech.geotrellis"
ThisBuild / crossScalaVersions := List("2.12.13", "2.11.12")
ThisBuild / crossScalaVersions := List(Settings.scala213, Settings.scala212, Settings.scala211)
Copy link
Member

@pomadchin pomadchin Mar 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that it is premature, but I'd drop 2.11 and move towards Spark 3 (see #3294); we have a greenlight here since GeoMesa is also crosscompiled against scala 2.12 now and is able to work with Spark 3.0.x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's the right thing to do when the spark upgrade happens.

def spire(module: String) = Def.setting {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) => "org.spire-math" %% "spire" % "0.13.0"
case Some((2, 12)) => "org.spire-math" %% "spire" % "0.13.0" // 0.17.0 exists for 2.12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw the spire version (as well as some other libs versions) should be aligned with Spark versions. i.e. if it is Spark 3 than it should be 0.17.0-M1 (but probably 0.17.0 is still compatible)

@pomadchin
Copy link
Member

I think the blocker you're talking about is caused by the relative packages namings. I don't remember the details though.

@philvarner philvarner force-pushed the create-partially-working-2.13 branch from aaf7559 to 9243d3d Compare March 9, 2021 01:11
@philvarner
Copy link
Contributor Author

I think the blocker you're talking about is caused by the relative packages namings. I don't remember the details though.

It seems to be because geotrellis.raster.Implicits has import geotrellis.vector._, which causes confusion between geotrellis.vector.{interpolation,summary,summary.polygonal}.Implicits and geotrellis.raster.{interpolation,summary,summary.polygonal}.Implicits

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

Successfully merging this pull request may close these issues.

2 participants