Skip to content
CCPEDIAby Unity Nodes
App Development

Specifying Scala version

4 posts312 views5 likesLast activity Jun 2021

  1. Rafael_GuglielmettiOP 1

    Hi !
    Is there a flag that can be passed to daml codegen to specify the Scala version ?
    I’m interested to drop the import _root_.scala.language.higherKinds; imports that are no longer relevant with 2.13 (especially because they trigger an unused import error.

    Thanks!

    Raf

  2. cocreature 1

    At this point there is no flag for this, the import will always be added.

  3. Stephen 2

    Moreover, I would suggest disabling all warnings for the module in which codegenned Scala is compiled, and to not compile any hand-written code in the same module.

    Reason being, there is nothing useful you could do anyway, should a warning arise in generated code. It would be unwise to modify the code, for example. Imagine a CI “coding style” check that rejected the generated code, for example; it’s all well and good to have a uniform style, but that doesn’t really operate in the same domain as generated code.

  4. Rafael_Guglielmetti 1

    Thanks for your replies!
    @Stephen yes, that’s what I’ll do.

    Somehow, I still think that codegen’d code should be compatible with relatively standard compiler flags of Scala 2.13 (and maybe dotty, now that it is out :slight_smile: )