mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-17 15:57:21 +03:00
Fix typing of nested decoders in daml2js (#6729)
I accidentally broke this when I added the types (very sorry about that). Unfortunately while the tests should actually have caught this, they didn’t because they are also broken. The `&&` results in bash assuming the exit code is handled and `set -e` doesn’t kick in so despite an error things proceeded just fine. The change turns ``` Add2: (<a_a1Ag>(a_a1Ag: damlTypes.Serializable<a_a1Ag>) => damlTypes.Serializable<Expr2.Add2>); ``` into ``` Add2: (<a_a1Ag>(a_a1Ag: damlTypes.Serializable<a_a1Ag>) => damlTypes.Serializable<Expr2.Add2<a_a1Ag>>); ``` which is obviuosly what we want and also fixes the test. I did verify that the tests fail afterwards without the change to daml2js. changelog_begin changelog_end
This commit is contained in:
parent
918bae2ed4
commit
4ac0a47c81
@ -444,7 +444,7 @@ renderSerializableDef SerializableDef{..}
|
||||
[ "export declare const " <> serName <> " :"
|
||||
, " (" <> tyArgs <> " => damlTypes.Serializable<" <> serName <> tyParams <> ">) & {"
|
||||
] ++
|
||||
[ " " <> n <> ": (" <> tyArgs <> " => damlTypes.Serializable<" <> serName <.> n <> ">);"
|
||||
[ " " <> n <> ": (" <> tyArgs <> " => damlTypes.Serializable<" <> serName <.> n <> tyParams <> ">);"
|
||||
| (n, _) <- serNestedDecoders
|
||||
] ++
|
||||
[ "};"
|
||||
|
@ -65,7 +65,8 @@ PATH=`dirname $YARN`:$PATH $DAML2TS -o daml2js $DAR
|
||||
# Build, lint, test.
|
||||
cd build-and-lint-test
|
||||
$YARN install --pure-lockfile > /dev/null
|
||||
$YARN run build && $YARN run lint
|
||||
$YARN run build
|
||||
$YARN run lint
|
||||
# Invoke 'yarn test'. Control is thereby passed to
|
||||
# 'language-support/ts/codegen/tests/ts/build-and-lint-test/src/__tests__/test.ts'.
|
||||
JAVA=$JAVA SANDBOX=$SANDBOX JSON_API=$JSON_API DAR=$DAR $YARN test
|
||||
|
Loading…
Reference in New Issue
Block a user