Skip to content

Commit

Permalink
Merge branch 'main' into fabiotudone-da/self-service-errors/kv/introd…
Browse files Browse the repository at this point in the history
…uce-v2-codes
  • Loading branch information
fabiotudone-da committed Oct 13, 2021
2 parents ddcfe32 + b738988 commit 829cba4
Show file tree
Hide file tree
Showing 56 changed files with 766 additions and 405 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help Daml improve
title: "[BUG] "
labels: ''
assignees: stefanobaghino-da, cocreature, gerolf-da, adriaanm-da
assignees: stefanobaghino-da

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea to improve Daml
title: "[FEATURE REQUEST] "
labels: ''
assignees: stefanobaghino-da, cocreature, gerolf-da, adriaanm-da
assignees: stefanobaghino-da

---

Expand Down
2 changes: 1 addition & 1 deletion LATEST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cfcdc13c6e05283d13d74fb9a7e980d294a078ea 1.18.0-snapshot.20211006.8003.0.cfcdc13c
514e8b50a3f901cd82b96ce17ee00f0ddf90dab3 1.18.0-snapshot.20211013.8071.0.514e8b50
e05be36512ade4d9cb6921614c23dadbde1747a3 1.17.1
49a75801fbafa1ffab3247ecfbb06a82925e8a0b 1.17.0
48050ad7836b9825c9dc7bd96fbc980b8eb9b6e5 1.16.0
Expand Down
4 changes: 2 additions & 2 deletions NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ASM 5.0.4 : BSD 3-clause "New" or "Revised" License
asn1-encoding 0.9.6 : BSD 3-clause "New" or "Revised" License
asn1-parse 0.9.5 : BSD 3-clause "New" or "Revised" License
asn1-types 0.3.4 : BSD 3-clause "New" or "Revised" License
asn1.js-rfc2560 v5.4.1 : MIT License
asn1.js v5.4.1 : MIT License
assoc 1.0.2 : BSD 3-clause "New" or "Revised" License
Async 0.9.2 : MIT License
Async 1.5.2 : MIT License
Expand Down Expand Up @@ -10549,7 +10549,7 @@ SOFTWARE
---

MIT License
(asn1.js-rfc2560 v5.4.1)
(asn1.js v5.4.1)

MIT License

Expand Down
6 changes: 3 additions & 3 deletions ci/bash-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# SPDX-License-Identifier: Apache-2.0

parameters:
var_name: ''
var_name: ""

steps:
- bash: |
set -euo pipefail
TMP=$(mktemp)
PROJ_DIR="$(pwd)"
cat > $TMP <<'END'
cat > "$TMP" <<'END'
PROJ_DIR="$PWD"
escape_slack() {
local r
r="$1"
Expand Down
23 changes: 13 additions & 10 deletions compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/DecodeV1.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import Data.List
import DA.Daml.LF.Mangling
import qualified Com.Daml.DamlLfDev.DamlLf1 as LF1
import qualified Data.NameMap as NM
import qualified Data.HashSet as HS
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Vector.Extended as V
Expand Down Expand Up @@ -229,16 +230,18 @@ decodeModule (LF1.Module name flags synonyms dataTypes values templates exceptio
<*> decodeNM DuplicateInterface decodeDefInterface interfaces

decodeDefInterface :: LF1.DefInterface -> Decode DefInterface
decodeDefInterface LF1.DefInterface {..} =
DefInterface
<$> traverse decodeLocation defInterfaceLocation
<*> decodeDottedNameId TypeConName defInterfaceTyconInternedDname
<*> decodeNameId ExprVarName defInterfaceParamInternedStr
<*> decodeNM DuplicateChoice decodeInterfaceChoice defInterfaceChoices
<*> decodeNM DuplicateChoice decodeChoice defInterfaceFixedChoices
<*> decodeNM DuplicateMethod decodeInterfaceMethod defInterfaceMethods
-- TODO https://github.com/digital-asset/daml/issues/11137
-- maybe also check that choice names are unique between virtual choices & fixed choices
decodeDefInterface LF1.DefInterface {..} = do
intLocation <- traverse decodeLocation defInterfaceLocation
intName <- decodeDottedNameId TypeConName defInterfaceTyconInternedDname
intParam <- decodeNameId ExprVarName defInterfaceParamInternedStr
intVirtualChoices <- decodeNM DuplicateChoice decodeInterfaceChoice defInterfaceChoices
intFixedChoices <- decodeNM DuplicateChoice decodeChoice defInterfaceFixedChoices
intMethods <- decodeNM DuplicateMethod decodeInterfaceMethod defInterfaceMethods
unless (HS.null (NM.namesSet intFixedChoices `HS.intersection` NM.namesSet intVirtualChoices)) $
throwError $ ParseError $ unwords
[ "Interface", T.unpack (T.intercalate "." (unTypeConName intName))
, "has collision between fixed choice and virtual choice." ]
pure DefInterface {..}

decodeInterfaceChoice :: LF1.InterfaceChoice -> Decode InterfaceChoice
decodeInterfaceChoice LF1.InterfaceChoice {..} =
Expand Down
16 changes: 7 additions & 9 deletions compiler/damlc/tests/daml-test-files/Interface.daml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ main = scenario do
Some Asset {amount} ->
amount === 5

-- TODO https://github.com/digital-asset/daml/issues/11137
-- uncomment once speedy supports fixed choices
-- cidToken4 <- exercise cidToken3 (GetRich 20)
-- token4 <- fetch cidToken4
-- getAmount token4 === 25
-- case fromToken token4 of
-- None -> abort "expected Asset"
-- Some Asset {amount} ->
-- amount === 25
cidToken4 <- exercise cidToken3 (GetRich 20)
token4 <- fetch cidToken4
getAmount token4 === 25
case fromToken token4 of
None -> abort "expected Asset"
Some Asset {amount} ->
amount === 25

pure ()
16 changes: 7 additions & 9 deletions compiler/damlc/tests/daml-test-files/InterfaceDesugared.daml
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,12 @@ main = scenario do
Some Asset {amount} ->
amount === 5

-- TODO https://github.com/digital-asset/daml/issues/11137
-- uncomment once speedy supports fixed choices
-- cidToken4 <- exercise cidToken3 (GetRich 20)
-- token4 <- fetch cidToken4
-- getAmount token4 === 25
-- case fromToken token4 of
-- None -> abort "expected Asset"
-- Some Asset {amount} ->
-- amount === 25
cidToken4 <- exercise cidToken3 (GetRich 20)
token4 <- fetch cidToken4
getAmount token4 === 25
case fromToken token4 of
None -> abort "expected Asset"
Some Asset {amount} ->
amount === 25

pure ()
Loading

0 comments on commit 829cba4

Please sign in to comment.