Specifying Scala version
- Rafael_GuglielmettiOP 1
Hi !
Is there a flag that can be passed todaml codegento specify the Scala version ?
I’m interested to drop theimport _root_.scala.language.higherKinds;imports that are no longer relevant with 2.13 (especially because they trigger anunused importerror.Thanks!
Raf
- cocreature 1
At this point there is no flag for this, the import will always be added.
- 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.
- 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
)