Skip to content

Support for Scala 2.12 (new trait encoding w/ default methods) #120

@dotta

Description

@dotta

MiMa has intimate knowledge of how traits are encoded by the Scala compiler up to 2.11. Because the trait encoding changed in Scala 2.12, MiMa needs to be updated to correctly handle both Scala 2.11 (and previous) and Scala 2.12 (and future) binaries.

A good place to start is to figure out how the current test suite can be adapted to run against both Scala 2.11 and Scala 2.12 (when running the current test suite against the Scala 2.12, less errors will be reported because of the new trait encoding). My thought is that we could have two problems.txt file for each test, one that is used as the oracle when running MiMa in Scala 2.11 mode, and another one when running MiMa in Scala 2.12 mode. But, if you have a better idea, go for it. The bottom line is that I'd suggest to first start from updating the tests, as they will help you validate all changes you'll need to make in the MiMa code to support the new Scala 2.12 trait encoding. After updating the tests, I'd start by looking at ClassInfo implementation. For instance, the implementation of ClassInfo.concreteMethods is based on the current trait encoding, and it simply won't work as expected with binaries produced with Scala 2.12.

This ticket may subsume #114.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions