Skip to content

Support both JS/JVM and 2.10/2.11 via unmanagedSourceDirectories #2

Description

@non

While adding scala.js support, I was forced to remove the src/main/scala_2.10 and src/main/scala_2.11 directories. Previously we used:

unmanagedSourceDirectories in Compile +=
  (sourceDirectory in Compile).value / s"scala_${scalaBinaryVersion.value}"

This didn't work with scala.js, so I was forced to write macros that worked in both 2.10 and 2.11. However, this makes the macros under 2.11 slightly less powerful.

Old code (more powerful):

def summon[Ev](c: Context)(ev: c.Tree): c.Tree = ev

New code (2.10 compatible):

def summon[Ev](c: Context)(ev: c.Expr[Ev]): c.Expr[Ev] = ev

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions