Disallowed language version when running daml trigger

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 trigger command 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-time

I 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-time

This 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-deprecations

Unfortunately we cannot “downgrade” to a previous language version because it causes a clash with other dependencies (in particular daml-finance which 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.

We managed to fix this issue by upgrading daml sdk to 2.5.0

Version 1.15 LF is not stable in the 2.4.x SDK. You must run triggers in dev mode using the --dev-mode-unsafe flag.

Using version 2.5.0 solved your problem because version 1.15 has meanwhile been made stable.