Scala codegen and ExerciseByKey
- oggyOP 1
If I run Scala Codegen on a template that has a key, how do I create an
ExerciseByKeyCommand, i.e., of the form:
https://docs.daml.com/app-dev/grpc/proto-docs.html#com-daml-ledger-api-v1-exercisebykeycommandIs this possible? I didn’t find anything in the codegen guide. A pointer to an example would be appreciated.
- Tamas_Kalcza
In the Java codegen you can create it via static methods. For example:
MyTypeWithAKey.exerciseByKeyExampleChoice("Example argument");Is this helpful or is the Scala codegen that different?
- stefanobaghino-da
The Scala code generation unfortunately does not generate a method to exercise by key, as of 1.2.x.
- oggy
Thanks, @Tamas_Kalcza and @stefanobaghino-da. Setting Java codegen up in addition to Scala is too much work for what I’m trying to do currently, so I’ll just convert the resulting gRPC
ExerciseCommandinto anExerciseByKeyCommandby hand. - Stephen 1
Probably the best choice. I’ve added a GitHub issue as well.
- Stephen 3
We’ve added this to Scala codegen, so it should appear in the next release.
- Gary_Verhaegen 1
Note that this is not part of the current 1.3RC, so “next release” here probably means 1.4.