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

Try to cross-compile Scio-core for Scala 3 #4638

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Dec 16, 2022

  1. Try to cross-compile scio-core and scio-macros for Scala 3

    * Adjust the build.sbt, add an additional option for checking S3 macros
    * Remove macro methods from classes and move them to separate modules
    adding them as mix-ins (e.g. the fallback method from Coder and
    safe from To)
    * adjust the Magnolia usage to accomodate the new Scala 3 API
    * some macro were reimplemented, other are still unimplemented (like
    To.safe)
    * references to static annotation macro were removed for now, until the
    experimental support for them will be added
    * redesign the usage of ClassTag in ScioContext for Scala 3 (now we
    generate ClassTag[Nothing] ourselves, if necessary)
    * some Scala 3 macros were moved to scio-core, for typechecking reasons
    * other minor changes, like added type annotations
    jchyb committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    5a986a6 View commit details
    Browse the repository at this point in the history
  2. Move scio-core contents to a scala-2 only module

    This was done to avoid hacks in build.sbt, and to keep the scio-avro
    dependency for Scala 2 scio-test, while removing it for Scala 3.
    scio-avro was not yet migrated to SCala 3, as it has some macro
    dependencies, that are still waiting for the macro static annotation
    support.
    jchyb committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    65dd387 View commit details
    Browse the repository at this point in the history
  3. Try to compile and run scio-test tests on Scala 3

    * Since the module depends on scio-avro (not yet being compiled for
    Scala 3), some test suites that depend on it were moved to a scala-2
    only module.
    * Some individual tests that were failing to compile were commented out
    for now - most of them test magnolia-based Coder derivation, which is
    only implemented for case classes for now
    jchyb committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    91cc877 View commit details
    Browse the repository at this point in the history