Disallowed language version when running daml trigger
- AfonsoOP
Hi all,
When working with the daml trigger library I faced some issues described in this forum post.
The problem:
I am working on daml triggers with daml sdk 2.4.0 using the local sandbox. I am able to compile the build the project without any warnings or errors, but when I am trying to run the
daml triggercommand I am experiencing issues. For instance for the following command:daml trigger \ --dar build/triggers-0.0.1.daml \ --trigger-name Trigger.Autoapproval.Onboarding.ServiceRequests:autoApprovalTrigger \ --ledger-user user1 \ --ledger-host localhost \ --ledger-port 6865 \ --wall-clock-timeI am facing the following error:
Exception in thread "main" com.daml.lf.speedy.Compiler$LanguageVersionError: Disallowed language version LanguageVersion(V1,LanguageMinorVersion(15)) 10:50:51.822 [TriggerRunner-akka.actor.default-dispatcher-8] INFO akka.actor.CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] daml-helper: Received ExitFailure 1 when running Raw command: java -Dlogback.configurationFile=... -jar ... trigger --dar build/triggers-0.0.1.daml --trigger-name Trigger.Autoapproval.Onboarding.ServiceRequests:autoApprovalTrigger --ledger-user user1 --ledger-host localhost --ledger-port 6865 --wall-clock-timeThis issue appears to be related with the build options we are using in order to target 1.15:
build-options: - --target=1.15 - --ghc-option=-Wno-deprecationsUnfortunately we cannot “downgrade” to a previous language version because it causes a clash with other dependencies (in particular
daml-financewhich we are using for the triggers), which makes the project impossible to build.Setup:
- OS: MacOS
- Daml version: 2.4.0
I was wondering if anyone here faced a similar issue, and could provide some help regarding this subject.
- Afonso
We managed to fix this issue by upgrading daml sdk to 2.5.0
- Remy
Version 1.15 LF is not stable in the
2.4.xSDK. You must run triggers in dev mode using the--dev-mode-unsafeflag.Using version 2.5.0 solved your problem because version 1.15 has meanwhile been made stable.