"Error: Unknown option" for option set in daml.yaml?
- WallaceKellyOP
Background
According to the docs, when running
daml startI can set options in thedaml.yamlfile for the Sandbox, Navigator, JSON API, and script runner:sandbox-options: a list of options that will be passed to Sandbox in daml start.navigator-options: a list of options that will be passed to Navigator in daml start.json-api-options: a list of options that will be passed to the HTTP JSON API in daml start.script-options: a list of options that will be passed to the Daml script runner when running the init-script as part of daml start.
Problem
However, sometimes when I try to set options in the
daml.yamlfile, I get this error:Error: Unknown option --some-option=some-valueFor example, the following in the
daml.yamlwill fail when runningdaml start…json-api-options: - --http-port=7575 - --log-level=DEBUG - --max-inbound-message-size=9000000…because of the
--http-port. But--http-portis definitely an option for thehttp-json-binary. Why is it reported as an “unknown option?” - WallaceKelly 1
In the case of the
--http-portexample, it fails becausedaml startis already passing a value for--http-portto thehttp-json-binary. It is passing a value becausedaml starthas a command line option--json-api-port. The invocation of thehttp-json-binaryhas--http-portincluded twice. The second one (from thedaml.yamlfile) is considered an “Unknown option” because the--http-portwas already set.You can see the same behavior if you add this to the
daml.yamlfile:navigator-options: - --port=7501