Can daml codegen js options be specified in daml.yaml?

I see that Java and Scala codegen options can be specified in daml.yaml using named flags. However daml codegen js doesn’t have named flags and specifying the letter flags in daml.yaml doesn’t seem to work for me.

Example:

sdk-version: 1.2.0
name: create-daml-app
version: 0.1.0
source: daml
parties:
- Alice
- Bob
- Charlie
dependencies:
- daml-prim
- daml-stdlib
- daml-trigger
sandbox-options:
- --wall-clock-time
- --ledgerid=create-daml-app-sandbox
start-navigator: false
codegen:
  - js:
    - .daml/dist/create-daml-app-0.1.0.dar
    - -o: daml.js

Reports no arguments when running daml codegen js:

$ daml codegen js
Missing: DAR-FILES -o DIR

Usage: daml2js DAR-FILES -o DIR [-s SCOPE]
  Generate TypeScript bindings from a DAR
daml-helper: Received ExitFailure 1 when running
Raw command: /Users/anthonylusardi/.daml/sdk/1.2.0/daml2js/daml2js
1 Like

At the moment you can’t specify those option in daml.yaml. But it sounds like a very useful feature! I recommend opening an issue at Issues · digital-asset/daml · GitHub.

4 Likes

Done. Thanks for clarifying.

1 Like