Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Specifying Scala versionForum ↗

Specifying Scala version

App Development4 posts288 views5 likesLast activity Jun 2021
RA
Rafael_GuglielmettiOP
Jun 2021

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

CO
cocreature
Jun 2021

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

ST
Stephen
Jun 2021

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.

RA
Rafael_Guglielmetti
Jun 2021

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

← Back to Discussions