Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Using type aliases with Symbol literals across projects crashes compiler. #181

Open
lJoublanc opened this issue May 25, 2018 · 1 comment
Labels

Comments

@lJoublanc
Copy link

lJoublanc commented May 25, 2018

When referring to a type alias defined in another project, the compiler crashes with errors like

[error] (b/compile:compileIncremental) malformed Scala signature of package at 139; bad constant tag: 37

I've created a minimal project to demonstrate this behaviour. Basically, define type MyOption = Option['mysymbol] in one project and refer to it in another causes a compiler crash. You can work around this if you copy the definition to the dependent project.

This only occurs when using Symbol type literals, so changing the type literal to a string "mysymbol" removes the error. (As shapeless uses Symbols for it's labels this is a problem though).

I can also see this is not reproducible in lightbend 2.13 branch (uncomment this in build.sbt to check).

@lJoublanc
Copy link
Author

This also appears to happen across compile and test tasks in a single SBT project. i.e. if I reference a singleton type declared in scala/main from scala/test, this error gets triggered.

@milessabin milessabin added the bug label Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants