Skip to content

Scala Support

Tim Dalton edited this page Nov 10, 2020 · 8 revisions

Scala Support

Scala support is implemented by the inject-scala-plugin.

Issues

  • A lot of unimplemented code that has not been executed by tests ported over from inject-java-test

    • In some case Scala's "???" method is used. If the code executes such method and "NotImplementedError" is thrown.
  • Code needs to refactored to be more idiomatic Scala. Some code was ported over from an equivalent Java implementation and auto-translated into Scala by IntelliJ and was left alone if tests passed. First priority was to make it work.

  • There is some code that was translated over that may not be needed yet. This was done early in development where I was trying emulate too closely what Java or Groovy versions were trying to do.

  • Support for Scala built-in type like List, Option (as opposed to Java Optional).

    • Would require modification to AbstractBeanDefinition.getBeanForMethodArgument and getBeanForConstuctorArgument methods. This will be trickier to avoid dependencies on Scala stuff in a non-Scala setting.
  • Dealing different versions of Scala has not been explored yet, like 2.12.x vs 2.13.x not to mention the upcoming Scala 3 (Dotty) release.

  • How does a project using SBT (Scala Build Tool) use this.