Specifying Scala version

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

1 Like

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

1 Like

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.

2 Likes

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: )

1 Like