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

Update built.sbt to support Scala 3 cross compile #77

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

Conversation

rtyley
Copy link
Member

@rtyley rtyley commented Jan 17, 2023

  • Dropped support for Scala 2.12.x
  • Fixed some sbt warnings caused by "in" syntax
  • Replaced versionDependent helper with CrossVersion
  • Updated some libraries to get Scala 3 versions

@rtyley rtyley force-pushed the scala-3-cross-compile branch from d13e9d4 to d834252 Compare January 24, 2023 16:42
@JamieB-gu JamieB-gu force-pushed the scala-3-cross-compile branch from d834252 to ed8257b Compare January 24, 2023 17:22
com.gu.marley.AvroEnumSchema(
${Expr(typ.typeSymbol.name)},
${Expr(pkg)},
${listMethod}.map(_.name).map(com.gu.marley.enumsymbols.SnakesOnACamel.toSnake)
Copy link
Member Author

Choose a reason for hiding this comment

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

The invocation of ${listMethod} currently doesn't compile, we see an error like this:

[error] -- [E007] Type Mismatch Error: /Users/Roberto_Tyley/code/marley/core/src/main/scala-3/com/gu/marley/AvroSerialisableMacro.scala:27:18
[error] 27 |                ${listMethod}.map(_.name).map(com.gu.marley.enumsymbols.SnakesOnACamel.toSnake)
[error]    |                  ^^^^^^^^^^
[error]    |                  Found:    (listMethod : x$1.reflect.Symbol)
[error]    |                  Required: quoted.Expr[Any]

I've opened https://stackoverflow.com/q/75309058/438886 to see if anyone can suggest how to get this compiling!

Copy link
Member Author

Choose a reason for hiding this comment

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

@JamieB-gu it looks like there's a very promising answer to the question on stackoverflow, I might take a look at trying it out tomorrow!

- Dropped support for Scala 2.12.x
- Fixed some sbt warnings caused by "in" syntax
- Replaced `versionDependent` helper with `CrossVersion`
- Updated some libraries to get Scala 3 versions
@rtyley rtyley force-pushed the scala-3-cross-compile branch from 2fcbff7 to f1970a3 Compare February 7, 2023 15:35
@rtyley rtyley force-pushed the scala-3-cross-compile branch from f1970a3 to 9775ec7 Compare February 7, 2023 15:36
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.

2 participants