daml/compatibility/bazel_tools
Stephen Compall a1d8e8dc33
replace commands-in-flight argument to trigger rule with getCommandsInFlight action (#7600)
* add getCommandsInFlight as a TriggerA action

* immediately update commandsInFlight on emitCommands

- delay until the rule had returned made sense before submitCommands was launched
  immediately; this also makes `getCommandsInFlight` more sensible

* remove commands-in-flight argument from high-level Trigger rule

CHANGELOG_BEGIN
- [Triggers] The "commands in flight" or ``Map CommandId [Command]`` argument has been
  removed from high-level trigger ``rule`` functions; instead, the current
  commands-in-flight can be retrieved with the new ``getCommandsInFlight`` function, which
  can be done immediately at the beginning of the rule's ``do`` block to preserve exact
  existing trigger behavior.
  See `issue #7600 <https://github.com/digital-asset/daml/pull/7600>`__.
CHANGELOG_END

* remove commands-in-flight argument from trigger tests

* update doc examples and copy in compatibility

- compatibility change will most likely entail another flag day in compatibility tests,
  replacing last_pre_7456_trigger_version

* update doc text for getCommandsInFlight

* test that getCommandsInFlight gets updated during the rule

* flag day for trigger compatibility tests

sdk-version: 1.7.0-snapshot.20201006.5358.0.0c1cadcf
File:     src/CopyTrigger.daml
Hidden:   no
Range:    55:11-55:19
Source:   typecheck
Severity: DsError
Message:
  src/CopyTrigger.daml:55:12: error:
  • Couldn't match type ‘TriggerA ()’ with ‘() -> TriggerA ()’
  Expected type: Party
-> DA.Next.Map.Map CommandId [Command] -> () -> TriggerA ()
  Actual type: Party -> ACS -> () -> TriggerA ()
  • In the ‘rule’ field of a record
  In the expression:
  Trigger
  {initialize = \ _acs -> (), updateState = \ _acs _message () -> (),
  rule = copyRule, registeredTemplates = AllInDar, heartbeat = None}
  In an equation for ‘copyTrigger’:
  copyTrigger
  = Trigger
  {initialize = \ _acs -> (), updateState = \ _acs _message () -> (),
  rule = copyRule, registeredTemplates = AllInDar, heartbeat = None}

* match docs on TriggerAState to current usage of these fields

* remove emittedCommands, as commandsInFlight is now kept up-to-date

* zoomed from where?

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-10-08 12:03:56 -04:00
..
client_server Share postgres instance in compatibility tests (#6504) 2020-06-26 11:18:57 +02:00
create-daml-app Replace yarn with npm (#7222) 2020-09-08 12:07:04 +02:00
daml_ledger Deprecate the "daml 1.2" version header. (#7513) 2020-09-29 13:14:59 +00:00
daml_script Support submitMustFail in DAML Script Service (#7076) 2020-08-12 08:54:34 +00:00
daml_trigger replace commands-in-flight argument to trigger rule with getCommandsInFlight action (#7600) 2020-10-08 12:03:56 -04:00
data_dependencies Validate data-dependencies test DARs (#6320) 2020-06-12 17:21:00 +00:00
test_utils Add a --timeout option to daml ledger commands (#6774) 2020-07-17 16:35:55 +02:00
BUILD Add platform-version field to daml.yaml (#6736) 2020-07-15 16:30:01 +02:00
create_daml_app_test.sh Replace yarn with npm (#7222) 2020-09-08 12:07:04 +02:00
daml_ledger_test.sh Include daml ledger tests in compatibility tests (#5740) 2020-04-27 16:13:16 +00:00
daml_sdk.bzl Add mirrors when fetching ledger-api-test-tool (#7041) 2020-08-06 14:05:17 +02:00
daml.cc.tpl Include puppeteer tests in compat tests (#6018) 2020-05-22 14:02:59 +02:00
sandbox-with-postgres.sh Include sadbonx-classic in compatibility tests (#6399) 2020-06-19 15:55:39 +02:00
testing.bzl update compat versions for 1.6.0-snapshot.20200922.5258.0.cd4a06db (#7473) 2020-09-24 21:11:25 +02:00
versions.bzl Setup compatibility tests for DAML Trigger (#6112) 2020-05-27 12:32:37 +00:00