daml/compiler
Moritz Kiefer 4460cb5e08
Fix trace statement handling in DAML Script service (#7292)
* Fix trace statement handling in DAML Script service

This PR makes sure that we get both trace statements coming from the
ledger client as well as from the ledger server. In the script service
those are two different Speedy machines so we need to interleave
them. This is a bit messy so let me explain the steps (apologies for
not splitting it up but I think it’s easier to understand the
motivation when it is a single PR):

1. Abstract over the tracelog interface. The ringbuffer doesn’t makes
   sense for our purposes and is annoying to clear.

2. Pass in the respective fields of `Machine` to `Conversions` instead
   of the whole machine. This is both a simpler design (passing around
   mutable objects scares me) and it allows us to assemble the fields
   from different machines.

3. Initialize the ledger machine with a simple ArrayBuffer tracelog.

4. After `submit` and `submitMustFail` copy the tracelog from the
   ledger to the client.

fixes #7280

changelog_begin
changelog_end

* Address review feedback

changelog_begin
changelog_end
2020-09-01 17:15:48 +00:00
..
daml-extension Document non-reproducible outputs (#7115) 2020-08-13 09:19:46 +00:00
daml-lf-ast DEL-8132 extract DAML LF haskell libraries (scripted) (#7246) 2020-09-01 12:09:26 +10:00
daml-lf-proto DEL-8132 extract DAML LF haskell libraries (scripted) (#7246) 2020-09-01 12:09:26 +10:00
daml-lf-reader DEL-8132 extract DAML LF haskell libraries (scripted) (#7246) 2020-09-01 12:09:26 +10:00
daml-lf-tools Add TO_TEXT_CONTRACT_ID primitive (#7137) 2020-08-17 08:39:16 +00:00
daml-lf-verify Fix record update evaluation order. (#6590) 2020-07-03 11:25:44 +01:00
daml-licenses replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00
damlc Fix trace statement handling in DAML Script service (#7292) 2020-09-01 17:15:48 +00:00
ghcide Get ghcide from the new upstream repo (#2867) 2019-09-11 08:57:48 +02:00
hie-core Get ghcide from the new upstream repo (#2867) 2019-09-11 08:57:48 +02:00
lsp-tests Track source locations on Daml.Script.submit (#7252) 2020-08-28 12:22:15 +00:00
repl-service Fix trace statement handling in DAML Script service (#7292) 2020-09-01 17:15:48 +00:00
scenario-service Fix trace statement handling in DAML Script service (#7292) 2020-09-01 17:15:48 +00:00
README.md open-sourcing daml 2019-04-04 09:33:38 +01:00

DAML Compiler

This directory contains several libraries used by and the executable for the DAML compiler.

Libraries

  • daml-lf-ast: The DAML-LF AST and type checker.