Skip to content

Commit

Permalink
Use jq -n everywhere (digital-asset#16514)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-williams-da authored Mar 10, 2023
1 parent e6faddb commit bbc4572
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 59 deletions.
4 changes: 2 additions & 2 deletions compiler/damlc/tests/daml-test-files/ChoiceObservers.daml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module ChoiceObservers where

-- @SINCE-LF 1.11

-- @QUERY-LF [ .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["TheTemplate"]) | .choices[] | select(lf::get_name($pkg) == "C1") | .observers | has("nil") ] == [ true ]
-- @QUERY-LF [ $pkg | .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["TheTemplate"]) | .choices[] | select(lf::get_name($pkg) == "C1") | .observers | has("nil") ] == [ true ]

-- @QUERY-LF [ .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["TheTemplate"]) | .choices[] | select(lf::get_name($pkg) == "C2") | .observers | has("app") ] == [ true ]
-- @QUERY-LF [ $pkg | .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["TheTemplate"]) | .choices[] | select(lf::get_name($pkg) == "C2") | .observers | has("app") ] == [ true ]


template TheTemplate
Expand Down
10 changes: 5 additions & 5 deletions compiler/damlc/tests/daml-test-files/ClassMethodNames.daml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
-- to Daml-LF.
--
-- @SINCE-LF 1.7
-- @QUERY-LF (.interned_strings | map(select(. == "m_baz")) == ["m_baz"])
-- @QUERY-LF (.interned_strings | map(select(. == "m_bar")) == ["m_bar"])
-- @QUERY-LF (.interned_strings | map(select(. == "m_foo1")) == ["m_foo1"])
-- @QUERY-LF (.interned_strings | map(select(. == "m_foo2")) == ["m_foo2"])
-- @QUERY-LF (.interned_strings | map(select(. == "s_1")) == ["s_1"])
-- @QUERY-LF ($pkg | .interned_strings | map(select(. == "m_baz")) == ["m_baz"])
-- @QUERY-LF ($pkg | .interned_strings | map(select(. == "m_bar")) == ["m_bar"])
-- @QUERY-LF ($pkg | .interned_strings | map(select(. == "m_foo1")) == ["m_foo1"])
-- @QUERY-LF ($pkg | .interned_strings | map(select(. == "m_foo2")) == ["m_foo2"])
-- @QUERY-LF ($pkg | .interned_strings | map(select(. == "s_1")) == ["s_1"])

module ClassMethodNames where

Expand Down
8 changes: 4 additions & 4 deletions compiler/damlc/tests/daml-test-files/EnumLF.daml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

-- Check that enum types get translated to Daml-LF's enum types.
-- @SINCE-LF 1.6
-- @QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Color"]) | has("enum")
-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["red"]) | .expr | has("enum_con")
-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["isRed"]) | .expr.abs.body.case.alts | .[0] | has("enum")
-- @QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Tag"]) | (has("enum") | not)
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Color"]) | has("enum")
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["red"]) | .expr | has("enum_con")
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["isRed"]) | .expr.abs.body.case.alts | .[0] | has("enum")
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Tag"]) | (has("enum") | not)

module EnumLF where

Expand Down
2 changes: 1 addition & 1 deletion compiler/damlc/tests/daml-test-files/ExceptionSyntax.daml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- SPDX-License-Identifier: Apache-2.0

-- @SINCE-LF-FEATURE DAML_EXCEPTIONS
-- @QUERY-LF [ .modules[].exceptions[] ] | length == 1
-- @QUERY-LF [ $pkg.modules[].exceptions[] ] | length == 1

-- | Test that exception syntax is correctly handled.
-- This is the "sugared" counterpart to ExceptionDesugared.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-- uses actors as a sanity check.

-- @SINCE-LF 1.5
-- @QUERY-LF [.modules[] | .values[] | .expr | .. | objects | select(has("exercise")) | .exercise | has("actor") | not] | (length > 0 and all)
-- @QUERY-LF [$pkg | .modules[] | .values[] | .expr | .. | objects | select(has("exercise")) | .exercise | has("actor") | not] | (length > 0 and all)

module ExerciseWithoutActors where

Expand Down
2 changes: 1 addition & 1 deletion compiler/damlc/tests/daml-test-files/Fixities.daml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Check that fixity metadata is added when available.

-- @SINCE-LF 1.8
-- @QUERY-LF [ .modules[].values[].name_with_type | select(lf::get_value_name($pkg)[0] | startswith("$$$$fixity")) | lf::norm_fixity_info($pkg) ] | any(. == {name: {namespace: "VarName", value: "pair"}, fixity: {precedence: 5, direction: "R"}}) and any(. == {name: {namespace: "TcClsName", value: "Pair"}, fixity: {precedence: 5, direction: "R"}}) and any(. == {name: {namespace: "DataName", value: "Pair"}, fixity: {precedence: 5, direction: "R"}}) and any(. == {name: {namespace: "VarName", value: "$u003c$u003c$u003c"}, fixity: {precedence: 1, direction: "R"}}) and any(. == {name: {namespace: "VarName", value: "$u0026$u0026$u0026"}, fixity: {precedence: 3, direction: "R"}})
-- @QUERY-LF [ $pkg.modules[].values[].name_with_type | select(lf::get_value_name($pkg)[0] | startswith("$$$$fixity")) | lf::norm_fixity_info($pkg) ] | any(. == {name: {namespace: "VarName", value: "pair"}, fixity: {precedence: 5, direction: "R"}}) and any(. == {name: {namespace: "TcClsName", value: "Pair"}, fixity: {precedence: 5, direction: "R"}}) and any(. == {name: {namespace: "DataName", value: "Pair"}, fixity: {precedence: 5, direction: "R"}}) and any(. == {name: {namespace: "VarName", value: "$u003c$u003c$u003c"}, fixity: {precedence: 1, direction: "R"}}) and any(. == {name: {namespace: "VarName", value: "$u0026$u0026$u0026"}, fixity: {precedence: 3, direction: "R"}})
module Fixities where

data Pair a b = Pair with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
-- Check that functional dependency metadata is added when available.

-- @SINCE-LF 1.8
-- @QUERY-LF .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$fdFoo"]) | .type | lf::norm_ty($pkg) | .forall | select(.vars | length == 2) | .body | lf::norm_ty($pkg) | .struct | .fields | length == 1
-- @QUERY-LF .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$fdBar"]) | .type | lf::norm_ty($pkg) | .forall | select(.vars | length == 5) | .body | lf::norm_ty($pkg) | .struct | .fields | length == 3
-- @QUERY-LF $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$fdFoo"]) | .type | lf::norm_ty($pkg) | .forall | select(.vars | length == 2) | .body | lf::norm_ty($pkg) | .struct | .fields | length == 1
-- @QUERY-LF $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$fdBar"]) | .type | lf::norm_ty($pkg) | .forall | select(.vars | length == 5) | .body | lf::norm_ty($pkg) | .struct | .fields | length == 3
module FunctionalDependencies where

class Foo a b | a -> b where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
-- All rights reserved.

-- @ SINCE-LF 1.6
-- @QUERY-LF [.modules[] | .values[] | .expr.val.module.package_ref | select(has("package_id_interned_str"))] | length == 2
-- @QUERY-LF .interned_strings | length >= 2
-- @QUERY-LF [$pkg | .modules[] | .values[] | .expr.val.module.package_ref | select(has("package_id_interned_str"))] | length == 2
-- @QUERY-LF $pkg | .interned_strings | length >= 2

-- We test that interning of package ids works. The two packages we reference are
-- daml-prim and daml-stdlib.
Expand Down
6 changes: 3 additions & 3 deletions compiler/damlc/tests/daml-test-files/InternedTypes.daml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
-- $$imports: $-1 (last entry in the type interning table)

-- @SINCE-LF 1.11
-- @QUERY-LF .interned_types | (length >= 4) and (.[0] | .var.var_interned_str | isnormal) and (.[1] | .var.var_interned_str | isnormal) and (.[2].prim | (.args | map(.interned) == [0, 1]) and (.prim == "ARROW")) and (.[3].prim | (.args | map(.interned) == [2, 2]) and (.prim == "ARROW")) and (.[4].forall.body.interned == 3)
-- @QUERY-LF [.modules[].values[]] | .[0:2] | all(.name_with_type.type.interned == 4)
-- @QUERY-LF [.modules[].values[]][-1].name_with_type.type.interned == (.interned_types | length - 1)
-- @QUERY-LF $pkg.interned_types | (length >= 4) and (.[0] | .var.var_interned_str | isnormal) and (.[1] | .var.var_interned_str | isnormal) and (.[2].prim | (.args | map(.interned) == [0, 1]) and (.prim == "ARROW")) and (.[3].prim | (.args | map(.interned) == [2, 2]) and (.prim == "ARROW")) and (.[4].forall.body.interned == 3)
-- @QUERY-LF [$pkg.modules[].values[]] | .[0:2] | all(.name_with_type.type.interned == 4)
-- @QUERY-LF [$pkg.modules[].values[]][-1].name_with_type.type.interned == ($pkg.interned_types | length - 1)

module InternedTypes where

Expand Down
2 changes: 1 addition & 1 deletion compiler/damlc/tests/daml-test-files/Locations.daml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
-- All rights reserved.

-- @QUERY-LF .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["A"]) | .location.range | (.start_line == 8 and .start_col == 9)
-- @QUERY-LF $pkg | .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["A"]) | .location.range | (.start_line == 8 and .start_col == 9)


module Locations where
Expand Down
8 changes: 4 additions & 4 deletions compiler/damlc/tests/daml-test-files/MinimalDef.daml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
-- All rights reserved.

-- @SINCE-LF 1.8
-- @QUERY-LF [ .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalFoo"]) ] | length == 1
-- @QUERY-LF [ .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalBar"]) ] | length == 0
-- @QUERY-LF [ .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalBaz"]) ] | length == 0
-- @QUERY-LF [ .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalDummy"]) ] | length == 1
-- @QUERY-LF [ $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalFoo"]) ] | length == 1
-- @QUERY-LF [ $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalBar"]) ] | length == 0
-- @QUERY-LF [ $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalBaz"]) ] | length == 0
-- @QUERY-LF [ $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$minimalDummy"]) ] | length == 1
module MinimalDef where

class Foo t where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

-- This test checks that we produce an $$imports value including all modules from which this one imports orphan instances, even transitively.
-- @SINCE-LF 1.7
-- @QUERY-LF .modules[] | select(lf::get_dotted_name($pkg) == ["ModuleImports_Main"]) | .values[].name_with_type | select(lf::get_value_name($pkg) == ["$$$$imports"]) | lf::norm_imports($pkg) | any(. == {package: null, module: ["ModuleImports_OrphanInstance"]})
-- @QUERY-LF $pkg | .modules[] | select(lf::get_dotted_name($pkg) == ["ModuleImports_Main"]) | .values[].name_with_type | select(lf::get_value_name($pkg) == ["$$$$imports"]) | lf::norm_imports($pkg) | any(. == {package: null, module: ["ModuleImports_OrphanInstance"]})

module ModuleImports_Main () where

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

-- This test checks that we produce an $$imports value including all modules from which this one imports orphan instances.
-- @SINCE-LF 1.7
-- @QUERY-LF .modules[] | select(lf::get_dotted_name($pkg) == ["ModuleImports_Middleman"]) | .values[].name_with_type | select(lf::get_value_name($pkg) == ["$$$$imports"]) | lf::norm_imports($pkg) | any(. == {package: null, module: ["ModuleImports_OrphanInstance"]})
-- @QUERY-LF $pkg | .modules[] | select(lf::get_dotted_name($pkg) == ["ModuleImports_Middleman"]) | .values[].name_with_type | select(lf::get_value_name($pkg) == ["$$$$imports"]) | lf::norm_imports($pkg) | any(. == {package: null, module: ["ModuleImports_OrphanInstance"]})

module ModuleImports_Middleman () where

Expand Down
12 changes: 6 additions & 6 deletions compiler/damlc/tests/daml-test-files/OverlapPragmas.daml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

-- This test checks that we produce annotations in LF for the various overlap modes.

-- @QUERY-LF [ .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["$$fFooOptional0"]) ] | length == 1
-- @QUERY-LF [ .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["$$$$om$$fFooOptional0"]) ] == []
-- @QUERY-LF .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFooOptional"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "OVERLAPPING"
-- @QUERY-LF .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFoof"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "OVERLAPPABLE"
-- @QUERY-LF .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFoox"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "OVERLAPS"
-- @QUERY-LF .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFooBool"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "INCOHERENT"
-- @QUERY-LF [ $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["$$fFooOptional0"]) ] | length == 1
-- @QUERY-LF [ $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["$$$$om$$fFooOptional0"]) ] == []
-- @QUERY-LF $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFooOptional"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "OVERLAPPING"
-- @QUERY-LF $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFoof"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "OVERLAPPABLE"
-- @QUERY-LF $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFoox"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "OVERLAPS"
-- @QUERY-LF $pkg | .modules[] | .values[] | .name_with_type | select(lf::get_value_name($pkg) == ["$$$$om$$fFooBool"]) | .type | lf::norm_ty($pkg) | .struct.fields[0] | lf::get_field($pkg) == "INCOHERENT"

module OverlapPragmas where

Expand Down
8 changes: 4 additions & 4 deletions compiler/damlc/tests/daml-test-files/RecordProjection.daml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ foo: Foo
foo = Foo with quux = 1


-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["dotSyntax"]) | .expr.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["dotSyntax"]) | .expr.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
dotSyntax: Int
dotSyntax = foo.quux

-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["dotSection"]) | .expr.abs.body.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["dotSection"]) | .expr.abs.body.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
dotSection: Foo -> Int
dotSection = (.quux)

-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["getFieldFull"]) | .expr.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["getFieldFull"]) | .expr.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
getFieldFull: Int
getFieldFull = getField @"quux" foo

-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["getFieldPartial"]) | .expr.abs.body.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["getFieldPartial"]) | .expr.abs.body.rec_proj | (lf::get_field($pkg) == "quux") and (.tycon.tycon | lf::get_dotted_name($pkg) == ["Foo"])
getFieldPartial: Foo -> Int
getFieldPartial = getField @"quux"
4 changes: 2 additions & 2 deletions compiler/damlc/tests/daml-test-files/RecordUpdate.daml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

-- @INFO range=44:18-44:42; Evaluate
-- @INFO range=44:25-44:41; Use const
-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["p_1_0"]) | .expr.rec_upd | (lf::get_field($pkg) == "x") and (.record.val | lf::get_value_name($pkg) == ["origin"]) and (.update.prim_lit.int64 == "1")
-- @QUERY-LF .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["p_1_2"]) | .expr.rec_upd | (lf::get_field($pkg) == "y") and (.record.rec_upd | (lf::get_field($pkg) == "x") and (.record.val | lf::get_value_name($pkg) == ["origin"]) and (.update.prim_lit.int64 == "1")) and (.update.prim_lit.int64 == "2")
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["p_1_0"]) | .expr.rec_upd | (lf::get_field($pkg) == "x") and (.record.val | lf::get_value_name($pkg) == ["origin"]) and (.update.prim_lit.int64 == "1")
-- @QUERY-LF $pkg | .modules[] | .values[] | select(.name_with_type | lf::get_value_name($pkg) == ["p_1_2"]) | .expr.rec_upd | (lf::get_field($pkg) == "y") and (.record.rec_upd | (lf::get_field($pkg) == "x") and (.record.val | lf::get_value_name($pkg) == ["origin"]) and (.update.prim_lit.int64 == "1")) and (.update.prim_lit.int64 == "2")

module RecordUpdate where

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- * "Reexports_Datatype.$sel:getT:T" (VarName namespace)
-- * Value "mkT" (VarName namespace)
-- @SINCE-LF 1.8
-- @QUERY-LF .modules[] | select(lf::get_dotted_name($pkg) == ["Reexports_Middleman"]) | [ .values[].name_with_type | select(lf::get_value_name($pkg)[0] | startswith("$$$$export")) | lf::norm_export_info($pkg)] | any(. == {"ExportInfoTC":{"name":{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"TcClsName","value":"T"}},"pieces":[{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"DataName","value":"T"}}],"fields":[{"label":"getT","is_overloaded":true,"selector":{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"VarName","value":"$$sel$u003agetT$u003aT"}}}]}}) and any(. == {"ExportInfoVal":{"name":{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"VarName","value":"mkT"}},"pieces":null,"fields":null}})
-- @QUERY-LF $pkg | .modules[] | select(lf::get_dotted_name($pkg) == ["Reexports_Middleman"]) | [ .values[].name_with_type | select(lf::get_value_name($pkg)[0] | startswith("$$$$export")) | lf::norm_export_info($pkg)] | any(. == {"ExportInfoTC":{"name":{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"TcClsName","value":"T"}},"pieces":[{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"DataName","value":"T"}}],"fields":[{"label":"getT","is_overloaded":true,"selector":{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"VarName","value":"$$sel$u003agetT$u003aT"}}}]}}) and any(. == {"ExportInfoVal":{"name":{"package":null,"module":["Reexports_Datatype"],"name":{"namespace":"VarName","value":"mkT"}},"pieces":null,"fields":null}})
module Reexports_Middleman (module Reexports_Datatype) where

import Reexports_Datatype
12 changes: 6 additions & 6 deletions compiler/damlc/tests/daml-test-files/SerializableAnnotation.daml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
-- All rights reserved.

-- @ QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Unserializable"]) | has("serializable") | not
-- @ QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["UnserializableReferenced"]) | has("serializable") | not
-- @ QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["UnserializableImported"]) | has("serializable") | not
-- @ QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Serializable"]) | .serializable
-- @ QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["SerializableReferenced"]) | .serializable
-- @ QUERY-LF .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["SerializableImported"]) | .serializable
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Unserializable"]) | has("serializable") | not
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["UnserializableReferenced"]) | has("serializable") | not
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["UnserializableImported"]) | has("serializable") | not
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["Serializable"]) | .serializable
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["SerializableReferenced"]) | .serializable
-- @QUERY-LF $pkg | .modules[] | .data_types[] | select(lf::get_dotted_name($pkg) == ["SerializableImported"]) | .serializable


module SerializableAnnotation where
Expand Down
Loading

0 comments on commit bbc4572

Please sign in to comment.