mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-05 03:56:26 +03:00
Remove LF1 in the compiler (#18203)
* make lf v2 and daml3-script the default * delete V1 integration tests * Remove LF major version V1 from the compiler run-all-tests: true * fix security evidence * fix //compiler/damlc/tests:damlc-test * fix //compiler/damlc/tests:data-dependencies * fix //compiler/damlc/tests:integration-v2* * fix //compiler/damlc/tests:packaging * fix //compiler/damlc/tests:platform-independence-dar-hash-file-matches * fix //compiler/damlc/tests:stable-packages * fix DarReaderTest.scala * fix DecodeCommonSpec.scala * fix //daml-lf/archive:proto_immutability_check * fix DamlLfEncoderTest.scala * fix //language-support/java/codegen:test * fix //daml-assistant/integration-tests:integration-tests * fix artifacts.yaml run-all-tests: true run-full-compat: true * Disable scenario-perf for now See https://github.com/digital-asset/daml/pull/18217. run-all-tests: true run-full-compat: true * restore explicit target version in docs template run-all-tests: true run-full-compat: true * Restore DamlLfEncoderTest.scala. Introduce a ENGINE_LF_VERSIONS constant in daml-lf.bzl instead. run-all-tests: true run-full-compat: true * delete daml-lf/scenario-interpreter/src/perf run-all-tests: true run-full-compat: true * Address review comments. * Apply Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com> * Restore golden/BUILD.bazel and port to 2.1 run-all-tests: true run-full-compat: true --------- Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
This commit is contained in:
parent
1971ccb930
commit
6393fd084c
@ -65,6 +65,9 @@ jobs:
|
||||
pool:
|
||||
name: "ubuntu_20_04"
|
||||
demands: assignment -equals default
|
||||
# TODO(https://github.com/digital-asset/daml/issues/18222): re-enable once
|
||||
# the benchmark has been ported to Daml 3.
|
||||
condition: False
|
||||
steps:
|
||||
- checkout: self
|
||||
- bash: ci/dev-env-install.sh
|
||||
|
@ -27,7 +27,7 @@ data Version = Version
|
||||
}
|
||||
deriving (Eq, Data, Generic, NFData, Show)
|
||||
|
||||
data MajorVersion = V1 | V2
|
||||
data MajorVersion = V2
|
||||
deriving (Eq, Data, Generic, NFData, Ord, Show, Enum, Bounded)
|
||||
|
||||
data MinorVersion = PointStable Int | PointDev
|
||||
@ -39,45 +39,9 @@ canDependOn :: Version -> Version -> Bool
|
||||
canDependOn (Version major1 minor1) (Version major2 minor2) =
|
||||
major1 == major2 && minor1 >= minor2
|
||||
|
||||
-- | Daml-LF version 1.6
|
||||
version1_6 :: Version
|
||||
version1_6 = Version V1 (PointStable 6)
|
||||
|
||||
-- | Daml-LF version 1.7
|
||||
version1_7 :: Version
|
||||
version1_7 = Version V1 (PointStable 7)
|
||||
|
||||
-- | Daml-LF version 1.8
|
||||
version1_8 :: Version
|
||||
version1_8 = Version V1 (PointStable 8)
|
||||
|
||||
-- | Daml-LF version 1.11
|
||||
version1_11 :: Version
|
||||
version1_11 = Version V1 (PointStable 11)
|
||||
|
||||
-- | Daml-LF version 1.12
|
||||
version1_12 :: Version
|
||||
version1_12 = Version V1 (PointStable 12)
|
||||
|
||||
-- | Daml-LF version 1.13
|
||||
version1_13 :: Version
|
||||
version1_13 = Version V1 (PointStable 13)
|
||||
|
||||
-- | Daml-LF version 1.14
|
||||
version1_14 :: Version
|
||||
version1_14 = Version V1 (PointStable 14)
|
||||
|
||||
-- | Daml-LF version 1.15
|
||||
version1_15 :: Version
|
||||
version1_15 = Version V1 (PointStable 15)
|
||||
|
||||
-- | The Daml-LF version used by default.
|
||||
versionDefault :: Version
|
||||
versionDefault = version1_15
|
||||
|
||||
-- | The Daml-LF 1.x development version.
|
||||
version1_dev :: Version
|
||||
version1_dev = Version V1 PointDev
|
||||
versionDefault = version2_1
|
||||
|
||||
-- | Daml-LF version 2.1
|
||||
version2_1 :: Version
|
||||
@ -89,11 +53,10 @@ version2_dev = Version V2 PointDev
|
||||
|
||||
-- Must be kept in sync with COMPILER_LF_VERSION in daml-lf.bzl.
|
||||
supportedOutputVersions :: [Version]
|
||||
supportedOutputVersions = [version1_14, version1_15, version1_dev, version2_1, version2_dev]
|
||||
supportedOutputVersions = [version2_1, version2_dev]
|
||||
|
||||
supportedInputVersions :: [Version]
|
||||
supportedInputVersions =
|
||||
[version1_8, version1_11, version1_12, version1_13] ++ supportedOutputVersions
|
||||
supportedInputVersions = supportedOutputVersions
|
||||
|
||||
-- | The Daml-LF version used by default by the compiler if it matches the
|
||||
-- provided major version, the latest non-dev version with that major version
|
||||
@ -101,7 +64,7 @@ supportedInputVersions =
|
||||
-- closest thing to the default user experience given a major version.
|
||||
--
|
||||
-- >>> map (renderVersion . defaultOrLatestStable) [minBound .. maxBound]
|
||||
-- ["1.15","2.1"]
|
||||
-- ["2.1"]
|
||||
defaultOrLatestStable :: MajorVersion -> Version
|
||||
defaultOrLatestStable major
|
||||
| versionMajor versionDefault == major = versionDefault
|
||||
@ -120,7 +83,6 @@ isDevVersion _ = False
|
||||
-- | True iff package metata is required for this LF version.
|
||||
requiresPackageMetadata :: Version -> Bool
|
||||
requiresPackageMetadata = \case
|
||||
Version V1 n -> n > PointStable 7
|
||||
Version V2 _ -> True
|
||||
|
||||
-- | A datatype describing a set of language versions. Used in the definition of
|
||||
@ -168,7 +130,6 @@ featureStringInterning :: Feature
|
||||
featureStringInterning = Feature
|
||||
{ featureName = "String interning"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersionsAfter (PointStable 7)
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Nothing
|
||||
}
|
||||
@ -178,7 +139,6 @@ featureTypeInterning :: Feature
|
||||
featureTypeInterning = Feature
|
||||
{ featureName = "Type interning"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersionsAfter (PointStable 11)
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Nothing
|
||||
}
|
||||
@ -197,7 +157,6 @@ featureBigNumeric :: Feature
|
||||
featureBigNumeric = Feature
|
||||
{ featureName = "BigNumeric type"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersionsAfter (PointStable 13)
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_BIGNUMERIC"
|
||||
}
|
||||
@ -206,7 +165,6 @@ featureExceptions :: Feature
|
||||
featureExceptions = Feature
|
||||
{ featureName = "Daml Exceptions"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersionsAfter (PointStable 14)
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_EXCEPTIONS"
|
||||
}
|
||||
@ -215,7 +173,6 @@ featureNatSynonyms :: Feature
|
||||
featureNatSynonyms = Feature
|
||||
{ featureName = "Nat type synonyms"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersionsAfter (PointStable 14)
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_NAT_SYN"
|
||||
}
|
||||
@ -224,7 +181,6 @@ featureSimpleInterfaces :: Feature
|
||||
featureSimpleInterfaces = Feature
|
||||
{ featureName = "Daml Interfaces"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersionsAfter (PointStable 15)
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_INTERFACE"
|
||||
}
|
||||
@ -247,7 +203,6 @@ featureTemplateTypeRepToText :: Feature
|
||||
featureTemplateTypeRepToText = Feature
|
||||
{ featureName = "templateTypeRepToText function"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> noMinorVersion
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_TEMPLATE_TYPEREP_TO_TEXT"
|
||||
}
|
||||
@ -270,7 +225,6 @@ featureNatTypeErasure :: Feature
|
||||
featureNatTypeErasure = Feature
|
||||
{ featureName = "Erasing types of kind Nat"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> noMinorVersion
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_NAT_TYPE_ERASURE"
|
||||
}
|
||||
@ -281,7 +235,6 @@ featureRightToLeftEvaluation :: Feature
|
||||
featureRightToLeftEvaluation = Feature
|
||||
{ featureName = "Right-to-left evaluation order"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> noMinorVersion
|
||||
V2 -> allMinorVersions
|
||||
, featureCppFlag = Just "DAML_RIGHT_TO_LEFT_EVALUATION"
|
||||
}
|
||||
@ -291,7 +244,6 @@ featureScenarios :: Feature
|
||||
featureScenarios = Feature
|
||||
{ featureName = "Scenarios"
|
||||
, featureVersionReq = VersionReq \case
|
||||
V1 -> allMinorVersions
|
||||
V2 -> noMinorVersion
|
||||
, featureCppFlag = Just "DAML_SCENARIOS"
|
||||
}
|
||||
@ -361,7 +313,6 @@ supports version feature = version `satisfies` featureVersionReq feature
|
||||
|
||||
renderMajorVersion :: MajorVersion -> String
|
||||
renderMajorVersion = \case
|
||||
V1 -> "1"
|
||||
V2 -> "2"
|
||||
|
||||
readSimpleInt :: ReadP Int
|
||||
@ -371,12 +322,11 @@ readMajorVersion :: ReadP MajorVersion
|
||||
readMajorVersion = do
|
||||
n <- readSimpleInt
|
||||
case n of
|
||||
1 -> pure V1
|
||||
2 -> pure V2
|
||||
_ -> pfail
|
||||
|
||||
-- >>> parseMajorVersion "1"
|
||||
-- Just V1
|
||||
-- >>> parseMajorVersion "2"
|
||||
-- Just V2
|
||||
-- >>> parseMajorVersion "garbage"
|
||||
-- Nothing
|
||||
parseMajorVersion :: String -> Maybe MajorVersion
|
||||
@ -413,23 +363,21 @@ readVersion = do
|
||||
minor <- readMinorVersion
|
||||
pure (Version major minor)
|
||||
|
||||
-- >>> parseVersion "1.dev"
|
||||
-- Just (Version {versionMajor = V1, versionMinor = PointDev})
|
||||
-- >>> parseVersion "1.15"
|
||||
-- Just (Version {versionMajor = V1, versionMinor = PointStable 15})
|
||||
-- >>> parseVersion "1.garbage"
|
||||
-- >>> parseVersion "2.dev"
|
||||
-- Just (Version {versionMajor = V2, versionMinor = PointDev})
|
||||
-- >>> parseVersion "2.15"
|
||||
-- Just (Version {versionMajor = V2, versionMinor = PointStable 15})
|
||||
-- >>> parseVersion "2.garbage"
|
||||
-- Nothing
|
||||
parseVersion :: String -> Maybe Version
|
||||
parseVersion = headMay . map fst . readP_to_S readVersion
|
||||
|
||||
-- >>> show (VersionReq (\case V1 -> noMinorVersion; V2 -> allV2MinorVersions))
|
||||
-- "VersionReq (\\case V1 -> Empty; V2 -> Inclusive_ PointDev PointDev)"
|
||||
-- >>> show (VersionReq (\V2 -> allMinorVersions))
|
||||
-- Variable not in scope: allV2MinorVersions :: Range MinorVersion
|
||||
instance Show VersionReq where
|
||||
show (VersionReq req) =
|
||||
concat
|
||||
[ "VersionReq (\\case V1 -> "
|
||||
, show (req V1)
|
||||
, "; V2 -> "
|
||||
[ "VersionReq (\\case V2 -> "
|
||||
, show (req V2)
|
||||
, ")"
|
||||
]
|
||||
@ -439,26 +387,22 @@ Renders a FeatureVersionReq.
|
||||
|
||||
>>> let r1 = R.Inclusive (PointStable 1) (PointStable 2)
|
||||
>>> let r2 = R.Inclusive (PointStable 3) PointDev
|
||||
|
||||
>>> renderFeatureVersionReq (VersionReq (\case V1 -> R.Empty; V2 -> R.Empty))
|
||||
>>> renderFeatureVersionReq (VersionReq (\V2 -> R.Empty))
|
||||
"none"
|
||||
>>> renderFeatureVersionReq (VersionReq (\case V1 -> r1; V2 -> R.Empty))
|
||||
"1.1 to 1.2"
|
||||
>>> renderFeatureVersionReq (VersionReq (\case V1 -> R.Empty; V2 -> r2))
|
||||
>>> renderFeatureVersionReq (VersionReq (\V2 -> R.Empty))
|
||||
"none"
|
||||
>>> renderFeatureVersionReq (VersionReq (\V2 -> r2))
|
||||
"2.3 to 2.dev"
|
||||
>>> renderFeatureVersionReq (VersionReq (\V2 -> r2))
|
||||
"2.3 to 2.dev"
|
||||
>>> renderFeatureVersionReq (VersionReq (\case V1 -> r1; V2 -> r2))
|
||||
"1.1 to 1.2, or 2.3 to 2.dev"
|
||||
-}
|
||||
renderFeatureVersionReq :: VersionReq -> String
|
||||
renderFeatureVersionReq (VersionReq req) = renderRanges (req V1) (req V2)
|
||||
renderFeatureVersionReq (VersionReq req) = renderRanges (req V2)
|
||||
where
|
||||
renderRanges R.Empty R.Empty = "none"
|
||||
renderRanges v1Range v2Range =
|
||||
renderRanges R.Empty = "none"
|
||||
renderRanges v2Range =
|
||||
intercalate ", or " $
|
||||
catMaybes
|
||||
[ renderRange (Version V1) v1Range
|
||||
, renderRange (Version V2) v2Range
|
||||
]
|
||||
catMaybes [ renderRange (Version V2) v2Range ]
|
||||
|
||||
renderRange cons = \case
|
||||
R.Empty -> Nothing
|
||||
|
@ -302,7 +302,7 @@ typeSynTests =
|
||||
, testGroup "bad" (map (mkBadTestcase version) badDefSets)
|
||||
, testGroup "bigger" (map (mkBiggerTestcase version) biggerExamples)
|
||||
]
|
||||
| version <- [version1_dev, version2_dev]
|
||||
| version <- [version2_dev]
|
||||
]
|
||||
where
|
||||
|
||||
|
@ -11,7 +11,6 @@ module DA.Daml.LF.Proto3.Decode
|
||||
import Com.Daml.DamlLfDev.DamlLf (ArchivePayload(..), ArchivePayloadSum(..))
|
||||
import DA.Daml.LF.Ast.Base ( Package, PackageId, PackageRef )
|
||||
import DA.Daml.LF.Proto3.Error
|
||||
import qualified DA.Daml.LF.Proto3.DecodeV1 as DecodeV1
|
||||
import qualified DA.Daml.LF.Proto3.DecodeV2 as DecodeV2
|
||||
import qualified DA.Daml.LF.Ast as LF
|
||||
import qualified Data.Text.Lazy as TL
|
||||
@ -23,11 +22,7 @@ decodeLfVersion :: LF.MajorVersion -> LF.PackageId -> T.Text -> Either Error LF.
|
||||
decodeLfVersion major pkgId minorText = do
|
||||
let unsupported :: Either Error a
|
||||
unsupported = throwError (UnsupportedMinorVersion minorText)
|
||||
-- For LF v1, We translate "no version" to minor version 0, since we
|
||||
-- introduced minor versions once v1 was already out, and we want to be able
|
||||
-- to parse packages that were compiled before minor versions were a thing.
|
||||
minor <- if
|
||||
| major == LF.V1 && T.null minorText -> pure $ LF.PointStable 0
|
||||
| Just minor <- LF.parseMinorVersion (T.unpack minorText) -> pure minor
|
||||
| otherwise -> unsupported
|
||||
let version = LF.Version major minor
|
||||
@ -38,9 +33,8 @@ decodeLfVersion major pkgId minorText = do
|
||||
decodePayload ::
|
||||
PackageId -> PackageRef -> ArchivePayload -> Either Error Package
|
||||
decodePayload pkgId selfPackageRef payload = case archivePayloadSum payload of
|
||||
Just (ArchivePayloadSumDamlLf1 package) -> do
|
||||
version <- decodeLfVersion LF.V1 pkgId minorText
|
||||
DecodeV1.decodePackage version selfPackageRef package
|
||||
Just (ArchivePayloadSumDamlLf1 _package) ->
|
||||
Left $ ParseError "Daml-LF v1 is not supported"
|
||||
Just (ArchivePayloadSumDamlLf2 package) -> do
|
||||
version <- decodeLfVersion LF.V2 pkgId minorText
|
||||
DecodeV2.decodePackage version selfPackageRef package
|
||||
|
@ -8,14 +8,10 @@ module DA.Daml.LF.Proto3.Encode
|
||||
import qualified Data.Text.Lazy as TL
|
||||
import Com.Daml.DamlLfDev.DamlLf (ArchivePayload(..), ArchivePayloadSum(..))
|
||||
import DA.Daml.LF.Ast
|
||||
import qualified DA.Daml.LF.Proto3.EncodeV1 as EncodeV1
|
||||
import qualified DA.Daml.LF.Proto3.EncodeV2 as EncodeV2
|
||||
|
||||
encodePayload :: Package -> ArchivePayload
|
||||
encodePayload package = case packageLfVersion package of
|
||||
(Version V1 minor) ->
|
||||
let payload = ArchivePayloadSumDamlLf1 (EncodeV1.encodePackage package)
|
||||
in ArchivePayload (TL.pack $ renderMinorVersion minor) (Just payload)
|
||||
(Version V2 minor) ->
|
||||
let payload = ArchivePayloadSumDamlLf2 (EncodeV2.encodePackage package)
|
||||
in ArchivePayload (TL.pack $ renderMinorVersion minor) (Just payload)
|
||||
|
@ -12,20 +12,18 @@ import qualified Data.Text as T
|
||||
|
||||
import DA.Daml.LF.Ast.Base
|
||||
import DA.Daml.LF.Ast.Util
|
||||
import DA.Daml.LF.Ast.Version (version1_dev, version2_dev, Version, renderVersion)
|
||||
import DA.Daml.LF.Ast.Version (version2_dev, Version, renderVersion)
|
||||
import DA.Daml.LF.Ast.World (initWorld)
|
||||
import DA.Daml.LF.Simplifier (simplifyModule)
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = defaultMain $ testGroup "DA.Daml.LF.Simplifier"
|
||||
-- The Simplifier calls the typechecker whose behavior is affected by feature flags. The
|
||||
-- simplifier may thus behave differently based on the version of LF and thus we need to test
|
||||
-- both x.dev versions as they will diverge over time.
|
||||
[ constantLiftingTests version1_dev
|
||||
, constantLiftingTests version2_dev
|
||||
]
|
||||
[ constantLiftingTests version2_dev ]
|
||||
|
||||
-- The Simplifier calls the typechecker whose behavior is affected by feature
|
||||
-- flags. The simplifier may thus behave differently based on the version of LF
|
||||
-- and thus we may need to test different LF versions as they diverge over time.
|
||||
constantLiftingTests :: Version -> TestTree
|
||||
constantLiftingTests version = testGroup ("Constant Lifting " <> renderVersion version)
|
||||
[ mkTestCase "empty module" [] []
|
||||
|
@ -17,9 +17,7 @@ import qualified Module as GHC
|
||||
import GhcMonad
|
||||
import Data.IORef
|
||||
import qualified Proto3.Suite as Proto
|
||||
import qualified DA.Daml.LF.Proto3.DecodeV1 as DecodeV1
|
||||
import qualified DA.Daml.LF.Proto3.DecodeV2 as DecodeV2
|
||||
import qualified DA.Daml.LF.Proto3.EncodeV1 as EncodeV1
|
||||
import qualified DA.Daml.LF.Proto3.EncodeV2 as EncodeV2
|
||||
import HscTypes
|
||||
import MkIface
|
||||
@ -718,7 +716,6 @@ readDalfFromFile dalfFile = do
|
||||
lfVersion <- getDamlLfVersion
|
||||
liftIO $
|
||||
case LF.versionMajor lfVersion of
|
||||
LF.V1 -> decode DecodeV1.decodeScenarioModule lfVersion
|
||||
LF.V2 -> decode DecodeV2.decodeScenarioModule lfVersion
|
||||
where
|
||||
decode decodeScenarioModule lfVersion = do
|
||||
@ -735,7 +732,6 @@ writeDalfFile dalfFile mod = do
|
||||
lfVersion <- getDamlLfVersion
|
||||
liftIO $
|
||||
case LF.versionMajor lfVersion of
|
||||
LF.V1 -> encode EncodeV1.encodeScenarioModule lfVersion
|
||||
LF.V2 -> encode EncodeV2.encodeScenarioModule lfVersion
|
||||
where
|
||||
encode encodeScenarioModule lfVersion = do
|
||||
|
@ -459,7 +459,7 @@ natSynTCon = LF.Qualified
|
||||
, qualObject = LF.TypeConName [tconName]
|
||||
}
|
||||
where
|
||||
packageId = "38e6274601b21d7202bb995bc5ec147decda5a01b68d57dda422425038772af7"
|
||||
packageId = "eb6926e50bb83fbc8f3e154c7c88b1219b31a3c0b812f26b276d46e212c2dd71"
|
||||
moduleName = ["DA", "Internal", "NatSyn"]
|
||||
tconName = "NatSyn"
|
||||
|
||||
|
@ -115,7 +115,6 @@ preconditionFailedTypeCon major = Qualified
|
||||
where
|
||||
-- We cannot look up these stable IDs using stablePackageByModuleName because
|
||||
-- it would introduce a cyclic dependency with StablePackages.
|
||||
packageId V1 = "f20de1e4e37b92280264c08bf15eca0be0bc5babd7a7b5e574997f154c00cb78"
|
||||
packageId V2 = "4d035c16dee0b8d75814624a05de9fcb062e942ff3b3b60d913335b468a84789"
|
||||
|
||||
mkPreconditionFailed :: MajorVersion -> Expr -> Expr
|
||||
|
@ -17,38 +17,6 @@ import DA.Daml.LF.Ast
|
||||
import DA.Daml.LF.Proto3.Archive.Encode
|
||||
import DA.Daml.UtilLF
|
||||
|
||||
allV1StablePackages :: MS.Map PackageId Package
|
||||
allV1StablePackages =
|
||||
MS.fromList $
|
||||
map (\pkg -> (encodePackageHash pkg, pkg))
|
||||
[ ghcTypes version1_6
|
||||
, ghcPrim version1_6
|
||||
, ghcTuple version1_6
|
||||
, daTypes version1_6
|
||||
, daInternalTemplate version1_6
|
||||
, daInternalAny version1_7
|
||||
, daTimeTypes version1_6
|
||||
, daNonEmptyTypes version1_6
|
||||
, daDateTypes version1_6
|
||||
, daSemigroupTypes version1_6
|
||||
, daMonoidTypes version1_6
|
||||
, daLogicTypes version1_6
|
||||
, daValidationTypes version1_6 (encodePackageHash (daNonEmptyTypes version1_6))
|
||||
, daInternalDown version1_6
|
||||
, daInternalErased version1_6
|
||||
, daInternalNatSyn version1_14
|
||||
, daInternalPromotedText version1_6
|
||||
, daSetTypes version1_11
|
||||
, daExceptionGeneralError version1_14
|
||||
, daExceptionArithmeticError version1_14
|
||||
, daExceptionAssertionFailed version1_14
|
||||
, daExceptionPreconditionFailed version1_14
|
||||
, daInternalInterfaceAnyViewTypes version1_15
|
||||
, daActionStateType version1_14 (encodePackageHash (daTypes version1_6))
|
||||
, daRandomTypes version1_14
|
||||
, daStackTypes version1_14
|
||||
]
|
||||
|
||||
allV2StablePackages :: MS.Map PackageId Package
|
||||
allV2StablePackages =
|
||||
MS.fromList $
|
||||
@ -82,18 +50,10 @@ allV2StablePackages =
|
||||
]
|
||||
|
||||
allStablePackages :: MS.Map PackageId Package
|
||||
allStablePackages =
|
||||
MS.unionWithKey
|
||||
duplicatePackageIdError
|
||||
allV1StablePackages
|
||||
allV2StablePackages
|
||||
where
|
||||
duplicatePackageIdError pkgId _ _ =
|
||||
error $ "duplicate package ID among stable packages: " <> show pkgId
|
||||
allStablePackages = allV2StablePackages
|
||||
|
||||
allStablePackagesForMajorVersion :: MajorVersion -> MS.Map PackageId Package
|
||||
allStablePackagesForMajorVersion = \case
|
||||
V1 -> allV1StablePackages
|
||||
V2 -> allV2StablePackages
|
||||
|
||||
allStablePackagesForVersion :: Version -> MS.Map PackageId Package
|
||||
|
@ -350,7 +350,6 @@ da_haskell_test(
|
||||
"//compiler/damlc/pkg-db",
|
||||
"//compiler/damlc/stable-packages",
|
||||
"//compiler/scenario-service/server:scenario_service_jar",
|
||||
"//daml-script/daml:daml-script-1.15.dar",
|
||||
"//daml-script/daml3:daml3-script-2.1.dar",
|
||||
ghc_pkg,
|
||||
],
|
||||
@ -550,78 +549,54 @@ daml_compile(
|
||||
version = "0.0.1",
|
||||
)
|
||||
|
||||
# Tests for data-dependencies
|
||||
[
|
||||
da_haskell_test(
|
||||
name = "data-dependencies-{}".format(suffix),
|
||||
timeout = "long",
|
||||
srcs = ["src/DA/Test/DataDependencies.hs"],
|
||||
args = test_args,
|
||||
data = [
|
||||
"//compiler/damlc",
|
||||
"@damlc_legacy",
|
||||
"//compiler/damlc/tests:generate-simple-dalf",
|
||||
"//daml-script/daml:daml-script-1.dev.dar",
|
||||
"//daml-script/daml3:daml3-script-2.dev.dar",
|
||||
# Feel free to update this to 0.13.55 once that is frozen.
|
||||
":dars/old-proj-0.13.55-snapshot.20200309.3401.0.6f8c3ad8-1.8.dar",
|
||||
da_haskell_test(
|
||||
name = "data-dependencies",
|
||||
timeout = "long",
|
||||
srcs = ["src/DA/Test/DataDependencies.hs"],
|
||||
data = [
|
||||
"//compiler/damlc",
|
||||
"@damlc_legacy",
|
||||
"//compiler/damlc/tests:generate-simple-dalf",
|
||||
"//daml-script/daml3:daml3-script-2.dev.dar",
|
||||
# Feel free to update this to 0.13.55 once that is frozen.
|
||||
":dars/old-proj-0.13.55-snapshot.20200309.3401.0.6f8c3ad8-1.8.dar",
|
||||
|
||||
# TODO(https://github.com/digital-asset/daml/issues/17366)
|
||||
# During development of LF 2.x this is generated using the HEAD compiler.
|
||||
# Once we release LF 2.1, we should replace this with a dar file
|
||||
# produced by the compiler corresponding to that release.
|
||||
":old-proj-2.1.dar",
|
||||
],
|
||||
hackage_deps = [
|
||||
"base",
|
||||
"bytestring",
|
||||
"extra",
|
||||
"ghc-lib-parser",
|
||||
"filepath",
|
||||
"process",
|
||||
"safe",
|
||||
"safe-exceptions",
|
||||
"tasty",
|
||||
"tasty-hunit",
|
||||
"zip-archive",
|
||||
],
|
||||
main_function = "DA.Test.DataDependencies.main",
|
||||
src_strip_prefix = "src",
|
||||
tags = [
|
||||
"cpu:3",
|
||||
] + extra_tags,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//compiler/daml-lf-ast",
|
||||
"//compiler/daml-lf-proto",
|
||||
"//compiler/daml-lf-reader",
|
||||
"//compiler/damlc/stable-packages:stable-packages-lib",
|
||||
"//libs-haskell/bazel-runfiles",
|
||||
"//libs-haskell/da-hs-base",
|
||||
"//libs-haskell/test-utils",
|
||||
"//sdk-version/hs:sdk-version-lib",
|
||||
],
|
||||
)
|
||||
for (suffix, extra_tags, test_args) in [
|
||||
# Test all LF versions on the main branch, after merging
|
||||
(
|
||||
"all",
|
||||
["main-only"],
|
||||
[],
|
||||
),
|
||||
# Don't test LF v1 when running the CI on a PR
|
||||
(
|
||||
"no-v1",
|
||||
["pr-only"],
|
||||
[
|
||||
"-p",
|
||||
# Test paths for these tests are of the form "foo.{lf-version}.bar"
|
||||
# This pattern excludes tests whose lf-version starts with "2."
|
||||
"'$$2 !~ /1./'",
|
||||
],
|
||||
),
|
||||
]
|
||||
]
|
||||
# TODO(https://github.com/digital-asset/daml/issues/17366)
|
||||
# During development of LF 2.x this is generated using the HEAD compiler.
|
||||
# Once we release LF 2.1, we should replace this with a dar file
|
||||
# produced by the compiler corresponding to that release.
|
||||
":old-proj-2.1.dar",
|
||||
],
|
||||
hackage_deps = [
|
||||
"base",
|
||||
"bytestring",
|
||||
"extra",
|
||||
"ghc-lib-parser",
|
||||
"filepath",
|
||||
"process",
|
||||
"safe",
|
||||
"safe-exceptions",
|
||||
"tasty",
|
||||
"tasty-hunit",
|
||||
"zip-archive",
|
||||
],
|
||||
main_function = "DA.Test.DataDependencies.main",
|
||||
src_strip_prefix = "src",
|
||||
tags = [
|
||||
"cpu:3",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//compiler/daml-lf-ast",
|
||||
"//compiler/daml-lf-proto",
|
||||
"//compiler/daml-lf-reader",
|
||||
"//compiler/damlc/stable-packages:stable-packages-lib",
|
||||
"//libs-haskell/bazel-runfiles",
|
||||
"//libs-haskell/da-hs-base",
|
||||
"//libs-haskell/test-utils",
|
||||
"//sdk-version/hs:sdk-version-lib",
|
||||
],
|
||||
)
|
||||
|
||||
[
|
||||
[
|
||||
@ -1103,48 +1078,6 @@ da_haskell_test(
|
||||
],
|
||||
)
|
||||
|
||||
da_haskell_test(
|
||||
name = "script-service-interfaces", # TODO: dedup with script-service test setup
|
||||
srcs = ["src/DA/Test/ScriptService_1_15.hs"],
|
||||
data = [
|
||||
"//compiler/damlc/pkg-db",
|
||||
"//compiler/damlc/stable-packages",
|
||||
"//compiler/scenario-service/server:scenario_service_jar",
|
||||
"//daml-script/daml:daml-script-1.15.dar",
|
||||
ghc_pkg,
|
||||
],
|
||||
hackage_deps = [
|
||||
"base",
|
||||
"containers",
|
||||
"directory",
|
||||
"data-default",
|
||||
"extra",
|
||||
"filepath",
|
||||
"ghcide",
|
||||
"lsp-types",
|
||||
"unordered-containers",
|
||||
"regex-tdfa",
|
||||
"tasty",
|
||||
"tasty-hunit",
|
||||
"text",
|
||||
"vector",
|
||||
],
|
||||
main_function = "DA.Test.ScriptService.main",
|
||||
deps = [
|
||||
"//compiler/daml-lf-ast",
|
||||
"//compiler/damlc:damlc-lib",
|
||||
"//compiler/damlc/daml-ide-core",
|
||||
"//compiler/damlc/daml-opts:daml-opts-types",
|
||||
"//compiler/damlc/daml-package-config",
|
||||
"//compiler/damlc/daml-rule-types",
|
||||
"//compiler/scenario-service/client",
|
||||
"//daml-assistant:daml-project-config",
|
||||
"//libs-haskell/bazel-runfiles",
|
||||
"//libs-haskell/da-hs-base",
|
||||
"//sdk-version/hs:sdk-version-lib",
|
||||
],
|
||||
)
|
||||
|
||||
da_haskell_test(
|
||||
name = "package-manager",
|
||||
size = "large",
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module AnyChoice where
|
||||
|
||||
import Daml.Script
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module AnyContractKey where
|
||||
|
||||
import Daml.Script
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.9 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module AnyEqOrd where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module AnyTemplate where
|
||||
|
||||
import Daml.Script
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
-- Check that invalid code points cause failure.
|
||||
-- @ERROR invalid code point
|
||||
-- @SINCE-LF 1.6 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module BadCodePoint where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.13 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module BigNumeric where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.13 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @ERROR Large BigNumeric (larger than Numeric) literals are not currently supported.
|
||||
|
||||
module BigNumericTooBig where
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.9 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module BuiltinOrd where
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
module ChoiceObservers where
|
||||
|
||||
-- @SINCE-LF 1.11 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
-- @QUERY-LF [ $pkg | .modules[] | .templates[] | select(lf::get_template_name($pkg) == ["TheTemplate"]) | .choices[] | select(lf::get_name($pkg) == "C1") | .observers | has("nil") ] == [ true ]
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
-- Ensure that class method names are preserved during the translation
|
||||
-- to Daml-LF.
|
||||
--
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.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"])
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
--
|
||||
-- Check that `coerceContractId` works properly.
|
||||
-- @SINCE-LF 1.5 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module CoerceContractId where
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- Check that the compiler bits of contract keys work.
|
||||
-- @SINCE-LF 1.4 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module ContractKeys where
|
||||
|
||||
|
@ -6,7 +6,7 @@ module DiscloseViaChoiceObserver where
|
||||
import Daml.Script
|
||||
import DA.Assert
|
||||
|
||||
-- @SINCE-LF 1.11 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @WARN range=40:15-40:70; Use of divulged contracts is deprecated
|
||||
|
||||
-- This example demonstrates the canonical use of choice-observers to achieve disclosure.
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.2 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module DisjunctionChoices where
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
-- Check that enum types get translated to Daml-LF's enum types.
|
||||
-- @SINCE-LF 1.6 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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")
|
||||
|
@ -5,7 +5,7 @@
|
||||
-- without actors. Also check that `internalExerciseWithActors` actually
|
||||
-- uses actors as a sanity check.
|
||||
|
||||
-- @SINCE-LF 1.5 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @QUERY-LF [$pkg | .modules[] | .values[] | .expr | .. | objects | select(has("exercise")) | .exercise | has("actor") | not] | (length > 0 and all)
|
||||
|
||||
module ExerciseWithoutActors where
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
-- Check that fixity metadata is added when available.
|
||||
|
||||
-- @SINCE-LF 1.8 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
-- Check that functional dependency metadata is added when available.
|
||||
|
||||
-- @SINCE-LF 1.8 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @ SINCE-LF 1.6 2.0
|
||||
-- @ SINCE-LF 2.1
|
||||
-- @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
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
-- ap2: $4
|
||||
-- $$imports: $-1 (last entry in the type interning table)
|
||||
|
||||
-- @SINCE-LF 1.11 2.0
|
||||
-- @SINCE-LF 2.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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- Make sure that invalid kinds are reported as errors by the Daml compiler.
|
||||
module KindChecking where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.11 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module Map where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.8 2.0
|
||||
-- @SINCE-LF 2.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
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- All rights reserved.
|
||||
|
||||
-- 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 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- All rights reserved.
|
||||
|
||||
-- This test checks that we produce an $$imports value including all modules from which this one imports orphan instances.
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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
|
||||
|
@ -6,7 +6,7 @@ module MoreChoiceObserverDivulgence where
|
||||
import Daml.Script
|
||||
import DA.Assert
|
||||
|
||||
-- @SINCE-LF 1.11 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
-- This example is a small modification of `DiscloseViaChoiceObserver`, but now the divulgence is achieved using a separate `Divulger` template, with a `Divulge` choice, which does a `fetch` on the given `id`, in the view of a choice-observer.
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
-- Ensure numeric literal cannot be out of bounds thanks to
|
||||
-- `NumericScale` constraint.
|
||||
--
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @ERROR range=16:12-16:19; Possible Daml-specific reason for the following type error: Tried to define a Numeric with a scale of 38, but only scales between 0 and 37 are supported.
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
-- condition on `NumericScale 38`. That is, we still get a
|
||||
-- conversion error even if we try to be clever.
|
||||
--
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @ERROR range=17:1-17:9; type-level natural outside of supported range [0, 37]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
-- condition on `NumericScale n`. That is, we still get a
|
||||
-- conversion error even if we try to be clever.
|
||||
--
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @ERROR range=19:1-19:8; Polymorphic numeric literal. Specify a fixed scale by giving the type, e.g. (2.71828 : Numeric 10)
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module NumericRound where
|
||||
|
||||
import Daml.Script
|
||||
|
@ -4,7 +4,7 @@
|
||||
-- Test that numeric scale information propagates automatically when working
|
||||
-- with numeric literals.
|
||||
--
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- @SINCE-LF 1.2 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module PartyVsText where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.1 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- Test that `(->)` can be used without any arguments.
|
||||
|
||||
module Profunctor where
|
||||
|
@ -10,7 +10,7 @@
|
||||
-- * with fields:
|
||||
-- * "Reexports_Datatype.$sel:getT:T" (VarName namespace)
|
||||
-- * Value "mkT" (VarName namespace)
|
||||
-- @SINCE-LF 1.8 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.13 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
-- | Test that pattern matching for RoundingMode works.
|
||||
module RoundingModeMatch where
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.13 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
-- | Test that rounding mode order matches the order in GHC.Types
|
||||
module RoundingModeOrder where
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
-- | Tests new "value cases" available since Daml 1.7
|
||||
--
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module SemanticsValueSince1_7 where
|
||||
|
||||
import Daml.Script
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- Check that `ContractId a` is serializable whenever `a` is serializable.
|
||||
-- @SINCE-LF 1.5 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module SerializablePolymorphicContractId where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.11 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module Set where
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
-- Check that enum types get translated to Daml-LF's enum types.
|
||||
-- @SINCE-LF 1.6 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
-- @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")
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module TemplateTypeRep where
|
||||
|
||||
import Daml.Script
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
module TemplateTypeRep2 where
|
||||
|
||||
template T1
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
-- @SINCE-LF 1.3 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module TextMap where
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Copyright (c) 2020 The Daml Authors. All rights reserved.
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
-- @SINCE-LF 1.7 2.0
|
||||
-- @SINCE-LF 2.1
|
||||
|
||||
module UnserializableScript where
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
b98e0e49d6d29d2305b0fd26b61e65ffb88d0c2a79bf10136a8d0c026b32d9bc META-INF/MANIFEST.MF
|
||||
af53bfb744c41db01eb8066a4f2485bab8af7444206202213be5a37dc0e2f36d platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/compiler/damlc/tests/PlatformIndependence.daml
|
||||
0000000000000000000000000000000000000000000000000000000000000000 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/compiler/damlc/tests/PlatformIndependence.hi
|
||||
0000000000000000000000000000000000000000000000000000000000000000 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/compiler/damlc/tests/PlatformIndependence.hie
|
||||
1f6ea91c9e829136d47bf8cd7a7ae0c61bde6036b2d5b4a85d24fd3e391e6891 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-886ba455abe8d308948a79e9d63bce1c55f1a1f6a28099c7f384a8ba123bd642.dalf
|
||||
6458feec418d71e834dfa5b56a32b640f0595d1cf9bef29c3456cf9eac1c921e platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Exception-ArithmeticError-cb0552debf219cc909f51cbb5c3b41e9981d39f8f645b1f35e2ef5be2e0b858a.dalf
|
||||
ce477181ed187d31fb71e2819cd8af24b3bee3ff55b02950c23363849cf86a47 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Exception-AssertionFailed-3f4deaf145a15cdcfa762c058005e2edb9baa75bb7f95a4f8f6f937378e86415.dalf
|
||||
a5dafa3128e153955c2360201cb700b09d170914847b184184e4413be848cecb platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Exception-GeneralError-86828b9843465f419db1ef8a8ee741d1eef645df02375ebf509cdc8c3ddd16cb.dalf
|
||||
9ec4a0044ebf1002e47c5119b06c8650535f0bd841d8a0c7189455a3720169f3 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Exception-PreconditionFailed-f20de1e4e37b92280264c08bf15eca0be0bc5babd7a7b5e574997f154c00cb78.dalf
|
||||
9a6861aa98233c2fd6a446edd4255c2891ab3db5eec355955381f35088956a23 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Internal-Erased-76bf0fd12bd945762a01f8fc5bbcdfa4d0ff20f8762af490f8f41d6237c6524f.dalf
|
||||
e66c79fc41a6bd6350ab265ee3bd15c0a6d5cd1748757194577448c89ce9e6a7 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Internal-NatSyn-38e6274601b21d7202bb995bc5ec147decda5a01b68d57dda422425038772af7.dalf
|
||||
608e8efb2ed17a67eae9ddb74ca235a848195da170f47bf4d18d33bc7e96cc44 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Internal-PromotedText-d58cf9939847921b2aab78eaa7b427dc4c649d25e6bee3c749ace4c3f52f5c97.dalf
|
||||
42105a59d0c9c7088a8860693f6da3d60ca62da5ccac1b9cf0dde8f975b984a5 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-DA-Types-40f452260bef3f29dede136108fc08a88d5a5250310281067087da6f0baddff7.dalf
|
||||
12906f0e43060e26f823f03c2bbfe4d541db833d370db4caae2c66f38acae440 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-GHC-Prim-e491352788e56ca4603acc411ffe1a49fefd76ed8b163af86cf5ee5f4c38645b.dalf
|
||||
bdc8c66d0511eff0262d3a133269e655bf47ba742e98ced5bc76a3fcd0211a73 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-GHC-Tuple-6839a6d3d430c569b2425e9391717b44ca324b88ba621d597778811b2d05031d.dalf
|
||||
e99c27f6b9d297aaf747b572356e08376ce8d7a994ff00242749978b8a8a9ab0 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-prim-GHC-Types-518032f41fd0175461b35ae0c9691e08b4aea55e62915f8360af2cc7a1f2ba6c.dalf
|
||||
242f711006c0b252b064819dee87b24a55b1575c7cae0d65500b076fb5b5e6aa platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-0.0.0-1e4198978900eebb4ed6126b8ba366e8d11924f1175aee86690fd9f1a8c0ce46.dalf
|
||||
dc4bd12915aea953a4ae6fb5e3b31fd3ec99605ae402c8b6350035ed9bbdeda7 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Action-State-Type-10e0333b52bba1ff147fc408a6b7d68465b157635ee230493bd6029b750dcb05.dalf
|
||||
6d9d1309c57dab98cb34fda6b26d3c6d5b2e5fb1357333bce2c0b26c262fc372 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Date-Types-bfcd37bd6b84768e86e432f5f6c33e25d9e7724a9d42e33875ff74f6348e733f.dalf
|
||||
acb729cf88297d61a52ba5852019326077f682e914052449d75142447b89b964 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Internal-Any-cc348d369011362a5190fe96dd1f0dfbc697fdfd10e382b9e9666f0da05961b7.dalf
|
||||
5625ab94e607b99fd03cfb3a618c3ec8227cf35dc917cc310d12c34691d10c9d platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Internal-Down-057eed1fd48c238491b8ea06b9b5bf85a5d4c9275dd3f6183e0e6b01730cc2ba.dalf
|
||||
fb97292e2989cf6b046d0c07355a86741ba327231b13596e646f6aed3c65b726 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Internal-Interface-AnyView-Types-6df2d1fd8ea994ed048a79587b2722e3a887ac7592abf31ecf46fe09ac02d689.dalf
|
||||
e6817a705c974eea0b05051e919e18cab97df616f3d8c8e590b41cde1147b7bf platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Internal-Template-d14e08374fc7197d6a0de468c968ae8ba3aadbf9315476fd39071831f5923662.dalf
|
||||
542ba5ef4d1707d77dbaa2c457adc06f28bad394968bae25635a982b7b1f6916 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Logic-Types-c1f1f00558799eec139fb4f4c76f95fb52fa1837a5dd29600baa1c8ed1bdccfd.dalf
|
||||
a70854a646e926e98a102a6d332c67872b4bc5978700bf946ce58dfc94ba993c platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Monoid-Types-6c2c0667393c5f92f1885163068cd31800d2264eb088eb6fc740e11241b2bf06.dalf
|
||||
e80bf135b35aa8a1eca973e1b57b95b2ff3c6f9b1039be8b0a8e6a1810bfc613 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-NonEmpty-Types-e22bce619ae24ca3b8e6519281cb5a33b64b3190cc763248b4c3f9ad5087a92c.dalf
|
||||
77210bf43703a6883586997dfab07154c988f294b144337d056f99ba14fa6150 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Random-Types-e4cc67c3264eba4a19c080cac5ab32d87551578e0f5f58b6a9460f91c7abc254.dalf
|
||||
aea033031e908d0a9b7c4701bc4a563c5f25b0f626ab3abb11725fe6525d4f79 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Semigroup-Types-8a7806365bbd98d88b4c13832ebfa305f6abaeaf32cfa2b7dd25c4fa489b79fb.dalf
|
||||
41970cee0963cbf25ffb1d35601b4200631aedf794f80ab22f999416b48d8531 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Set-Types-97b883cd8a2b7f49f90d5d39c981cf6e110cf1f1c64427a28a6d58ec88c43657.dalf
|
||||
e198664748ca9a14de3cf197a0bac3aec6deb3d4097db73dfbf300bb97e30b9a platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Stack-Types-5921708ce82f4255deb1b26d2c05358b548720938a5a325718dc69f381ba47ff.dalf
|
||||
826cad481a81e8e1fd7151a0f9c3bf5c14cc14e2983e1abc143387dafe4b8282 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Time-Types-733e38d36a2759688a4b2c4cec69d48e7b55ecc8dedc8067b815926c917a182a.dalf
|
||||
348c6f5fcd6b3b2753a8418cdb980b3a8c73fcc37ff1ffc63c0a9625159ca067 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/daml-stdlib-DA-Validation-Types-99a2705ed38c1c26cbb8fe7acf36bbf626668e167a33335de932599219e0a235.dalf
|
||||
7c01b1498116f7aaa482d6a3ffbbbc54107c1391cc3b2e5fd8a5045217106007 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/data/platform-independence-1.0.0.conf
|
||||
6225979a290a1b43b0b96e11c777a03ee3cb34b0f864aa75981b33fbb7d9c9f3 platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b/platform-independence-1.0.0-1ad54d1bc41e9d075a7b1ea15ac8a0f1764cf679b012077fa52a7d8335b21c3b.dalf
|
||||
5858246bf25b81a0d090f5c29b9f3ba546245b2ca584014a6672d06ca52fccd2 META-INF/MANIFEST.MF
|
||||
af53bfb744c41db01eb8066a4f2485bab8af7444206202213be5a37dc0e2f36d platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/compiler/damlc/tests/PlatformIndependence.daml
|
||||
0000000000000000000000000000000000000000000000000000000000000000 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/compiler/damlc/tests/PlatformIndependence.hi
|
||||
0000000000000000000000000000000000000000000000000000000000000000 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/compiler/damlc/tests/PlatformIndependence.hie
|
||||
f4508f462dece9523202391339e71e17d468feab10bc3fb534a3fd24b2ca50eb platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-723a2a08760db1767690d47827046c936418aca1145e15f18a6850377f92e4d2.dalf
|
||||
7753f914997075d73cb5bc6a0385d2adb9771bdbf7616dd4493061428b61094b platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Exception-ArithmeticError-0e35772044c88dda5159f70a9170eae0f07e2f1942af4ab401e7cd79166e8c94.dalf
|
||||
7d847f3b915631bdc2f02d7a728634a84aff5e10be7c0f2c3b1dede07c627103 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Exception-AssertionFailed-ffc462638e7338aaf5d45b3eae8aba5d8e9259a2e44d1ec9db70ed4ee83601e0.dalf
|
||||
72a94dbec4cca5373146dd87eff9d2f5f17de2ed86b029e97149dca6c3e61909 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Exception-GeneralError-48426ca53c6510a1d641cdc05dd5b3cea288bd4bcd54311ffaa284b5097d4b9d.dalf
|
||||
8aa84ab48fd28a04f16f6cbc0445e7d2a25788c83ba9481b4186bb41527f8489 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Exception-PreconditionFailed-4d035c16dee0b8d75814624a05de9fcb062e942ff3b3b60d913335b468a84789.dalf
|
||||
b7231004ce0a71af79fd3170ad7a4722d056b33d359c40667da8945a80bb774f platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Internal-Erased-71ca307ec24fc584d601fd6d5f49ec76d100730f56eef290e41248f32ccadfb1.dalf
|
||||
e4f030ce0b2c2bf4f75d12796842b60bf19c9f6d3a3e38251d4fc7831bd21fa2 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Internal-NatSyn-eb6926e50bb83fbc8f3e154c7c88b1219b31a3c0b812f26b276d46e212c2dd71.dalf
|
||||
7c7b9661de3b11759d2b31170a31557b31fdf71475440a1d19f9b433682d73e7 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Internal-PromotedText-c2bac57e7a921c98523ae40766bfefab9f5b7bf4bf34e1c09d9a9d1483417b6c.dalf
|
||||
57b95cf6d28642123683263e7042d3e7aa433983bee15f02c6b3be91fdb1570b platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-DA-Types-87530dd1038863bad7bdf02c59ae851bc00f469edb2d7dbc8be3172daafa638c.dalf
|
||||
7ee841faf1822a6f2d862fd5c0124ba5c19f7e9b7aa38b51e1734e52d6e369d6 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-GHC-Prim-37375ebfb7ebef8a38aa0d037db55833bcac40eb04074b9024ed81c249ea2387.dalf
|
||||
759096170bd66b0a9e143bcb1b13a3da9b73c1dbef8f332acf316e107b976e97 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-GHC-Tuple-afbf83d4d9ef0fb1a4ee4d1d6bef98b5cea044a6d395c1c27834abd7e8eb57ae.dalf
|
||||
6b86980eae30973a596dd3a14604a49c3a81df83c22d427d7c8aee95f5b34986 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-prim-GHC-Types-2f07eb3e4731beccfd88fcd19177268f120f9a2b06a52534ee808a4ba1e89720.dalf
|
||||
c57e2b2a2dde8cb0f74948b3dd27801cd2342c7613e4cec71c0983fe4d861c50 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-0.0.0-622ab497c8d33f08ad526df714bdf4d51f55d8f6517f8bc03b2db1603d6de71f.dalf
|
||||
54303c132e8d1c59140ccda13f7d2085a885ca3fb3f6fd0fa3cdfcea1f9c13dd platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Action-State-Type-2d7314e12cc21ce1482d7a59ab8b42f8deafbe3cdb62eae9fcd4f583ba0ad8d0.dalf
|
||||
d271f772f550b8552d4d62afeb1cf52ec5ca338afcd0f81187151043a7669111 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Date-Types-a4c44a89461229bb4a4fddbdeabe3f9dfaf6db35896c87d76f638cd45e1f0678.dalf
|
||||
3eb9afc8c9d2c0c7cf2d9fce7b67176d253937df7edb445f806bb92dd35fba49 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Internal-Any-7de198711a7a5b3c897eff937b85811438d22f48452a118222590b0ec080bf54.dalf
|
||||
214528ffb6a47cd06842e1c967d0229b2b40c01558f65820227724c8dc580fe5 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Internal-Down-35df06619756af233f13051ba77718e172589b979d22dd3ec40c8787563bb435.dalf
|
||||
57a2209fe7455e34719b1bb144bbcaf954bb636aa84f8abd98ea4752dea0b237 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Internal-Interface-AnyView-Types-db7b27684bd900f7ca47c854d526eeaffd9e84d761859c66cc6cf5957ad89ed4.dalf
|
||||
087da7033930c176e6bc0f8fdff465d496a749c807f154d1ce00ab38a5551c86 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Internal-Template-c2eed01333d3c95b12ca5ef0f196db5cd481c58902e01c8ac6b1e49a62875aa5.dalf
|
||||
3bd856f195b5fe6878155acd30d64f76bcf0065747725a4f4756647fd61d17c1 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Logic-Types-19cfdcbac283f2a26c05bfcea437177cfb7adb0b2eb8aa82944e91b13b671912.dalf
|
||||
71f6d54039b58970475720e76737351995ba8782ce97df708efbc0bc79f8150a platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Monoid-Types-bb581ddc78c4c0e682727d9a2302dc1eba5941809c528aca149a5fdaf25c6cbd.dalf
|
||||
ed2942d4af24cb2caf20d61d7ea21f724197dcf3a7bf83c41ed19644074fb9e0 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-NonEmpty-Types-d3a94c9e99da7fbb5e35d52d05eec84db27233d4c1aed75548dba1057c84ad81.dalf
|
||||
13a66a07ebec59ee8f86a20d0ce97db3bee35ba326766c88e89598a6df96ef29 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Random-Types-58f4cb7b68a305d056a067c03083f80550ed7d98d6fe100a5ddfa282851ba49a.dalf
|
||||
c1860753e8cefcec4dd6af70cd50827e6dbcfdedc6b6345d42e1114955aa3eaa platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Semigroup-Types-ceb729ab26af3934f35fb803534d633c4dd37b466888afcced34a32155e9c2cd.dalf
|
||||
7eacd55658d4500b89762f1f67fe8a9ae72a35716ea15108ddd361abb9e4f7ae platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Set-Types-9d88bb9904dab8f44a47e4f27c8d8ee4fc57fece9c2e3d385ef7ed19fcc24049.dalf
|
||||
cb1de1fd96f95c42268fb15cf2353d0ea8d506f75caebd686896c1838df712ff platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Stack-Types-747f749a860db32a01ae0c5c741e6648497b93ffcfef3948854c31cc8167eacf.dalf
|
||||
b7ce18d5f2642b00d49f8957d0311ebd89c6de164fae0992059c7eaae1818935 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Time-Types-b47113ba94c31372c553e3869fffed9a45ef1c0f5ac1be3287857cd9450c0bae.dalf
|
||||
a6d1d84b5f296dd1eb7bd9b7cbee4d8a133f18f9d04b77fa95e52599ddcbbc92 platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/daml-stdlib-DA-Validation-Types-4687117abb53238857bccdb0d00be7fc005eb334e1f232de3d78152b90b3f202.dalf
|
||||
aeadfc7e36c2a9cef5465719ccdc616d0468cce602556abe8994acb7b082ff5c platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/data/platform-independence-1.0.0.conf
|
||||
7d6afcae1a4acdcc9ebe89d878bc0c06d7a1c7b74cc92a6b4e088d2d15f7fb8c platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549/platform-independence-1.0.0-4a8de1af85f99bbd8adbf993adbdbc87270910bafa190614e83ef4e00da38549.dalf
|
||||
|
@ -731,7 +731,7 @@ tests damlc =
|
||||
renderVersion
|
||||
(fromMaybe
|
||||
(error "DamlcUpgrades: featureMinVersion should be defined over featurePackageUpgrades")
|
||||
(featureMinVersion featurePackageUpgrades V1))
|
||||
(featureMinVersion featurePackageUpgrades V2))
|
||||
] ++ ["upgrades: '" <> path <> "'" | Just path <- pure upgradedFile]
|
||||
)
|
||||
|
||||
|
@ -34,14 +34,6 @@ main = withSdkVersions $ do
|
||||
damlc <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> exe "damlc")
|
||||
damlcLegacy <- locateRunfiles ("damlc_legacy" </> exe "damlc_legacy")
|
||||
let validate dar = callProcessSilent damlc ["validate-dar", dar]
|
||||
v1TestArgs <- do
|
||||
let targetDevVersion = LF.version1_dev
|
||||
let exceptionsVersion = minExceptionVersion LF.V1
|
||||
let simpleDalfLfVersion = LF.defaultOrLatestStable LF.V1
|
||||
scriptDevDar <- locateRunfiles (mainWorkspace </> "daml-script" </> "daml" </> "daml-script-1.dev.dar")
|
||||
oldProjDar <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "tests" </> "dars" </> "old-proj-0.13.55-snapshot.20200309.3401.0.6f8c3ad8-1.8.dar")
|
||||
let lfVersionTestPairs = lfVersionTestPairsV1
|
||||
return TestArgs{..}
|
||||
v2TestArgs <- do
|
||||
let targetDevVersion = LF.version2_dev
|
||||
let exceptionsVersion = minExceptionVersion LF.V2
|
||||
@ -50,7 +42,7 @@ main = withSdkVersions $ do
|
||||
oldProjDar <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "tests" </> "old-proj-2.1.dar")
|
||||
let lfVersionTestPairs = lfVersionTestPairsV2
|
||||
return TestArgs{..}
|
||||
let testTrees = map tests [v1TestArgs, v2TestArgs]
|
||||
let testTrees = map tests [v2TestArgs]
|
||||
defaultMain (testGroup "Data Dependencies" testTrees)
|
||||
where
|
||||
minExceptionVersion major =
|
||||
@ -82,25 +74,6 @@ darPackageIds fp = do
|
||||
Right dalfPkgIds <- pure $ mapM (LFArchive.decodeArchivePackageId . BSL.toStrict) $ mainDalf : dalfDeps
|
||||
pure dalfPkgIds
|
||||
|
||||
-- | We test two sets of versions:
|
||||
-- 1. Versions no longer supported as output versions by damlc are tested against
|
||||
-- 1.14.
|
||||
-- 2. For all other versions we test them against the next version + extra (1.dev, 1.dev)
|
||||
lfVersionTestPairsV1 :: [(LF.Version, LF.Version)]
|
||||
lfVersionTestPairsV1 =
|
||||
let supportedInputVersions =
|
||||
sortOn LF.versionMinor $
|
||||
filter (hasMajorVersion LF.V1) LF.supportedInputVersions
|
||||
supportedOutputVersions =
|
||||
sortOn LF.versionMinor $
|
||||
filter (hasMajorVersion LF.V1) LF.supportedOutputVersions
|
||||
legacyPairs = map (,LF.version1_14) (supportedInputVersions \\ supportedOutputVersions)
|
||||
nPlusOnePairs = zip supportedOutputVersions (tail supportedOutputVersions)
|
||||
selfPair = (LF.version1_dev, LF.version1_dev)
|
||||
in selfPair : concat [legacyPairs, nPlusOnePairs]
|
||||
where
|
||||
hasMajorVersion major v = LF.versionMajor v == major
|
||||
|
||||
-- | We test each version against the next one + extra (2.dev, 2.dev)
|
||||
lfVersionTestPairsV2 :: [(LF.Version, LF.Version)]
|
||||
lfVersionTestPairsV2 =
|
||||
|
@ -23,15 +23,11 @@ main :: IO ()
|
||||
main = withSdkVersions $ do
|
||||
damlc <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> exe "damlc")
|
||||
damlScript <- locateRunfiles (mainWorkspace </> "daml-script" </> "runner" </> exe "daml-script-binary")
|
||||
v1TestArgs <- do
|
||||
scriptDar <- locateRunfiles (mainWorkspace </> "daml-script" </> "daml" </> "daml-script.dar")
|
||||
let lfVersion = LF.defaultOrLatestStable LF.V1
|
||||
pure TestArgs{..}
|
||||
v2TestArgs <- do
|
||||
scriptDar <- locateRunfiles (mainWorkspace </> "daml-script" </> "daml3" </> "daml3-script.dar")
|
||||
let lfVersion = LF.defaultOrLatestStable LF.V2
|
||||
pure TestArgs{..}
|
||||
let testTrees = map tests [v1TestArgs, v2TestArgs]
|
||||
let testTrees = map tests [v2TestArgs]
|
||||
defaultMain (testGroup "Incremental builds" testTrees)
|
||||
|
||||
data TestArgs = TestArgs
|
||||
|
@ -399,7 +399,7 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, "source: ."
|
||||
, "dependencies: [daml-prim, daml-stdlib]"
|
||||
]
|
||||
withCurrentDirectory projDir $ callProcessSilent damlc ["build", "-o", "foobar.dar", "--target=1.dev"]
|
||||
withCurrentDirectory projDir $ callProcessSilent damlc ["build", "-o", "foobar.dar", "--target=2.dev"]
|
||||
Right Dalfs{..} <- readDalfs . Zip.toArchive <$> BSL.readFile (projDir </> "foobar.dar")
|
||||
(_pkgId, pkg) <- either (fail . show) pure (LFArchive.decodeArchive LFArchive.DecodeAsMain (BSL.toStrict mainDalf))
|
||||
LF.packageMetadata pkg @?= Just (LF.PackageMetadata (LF.PackageName "foobar") (LF.PackageVersion "1.2.3") Nothing)
|
||||
@ -416,7 +416,7 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
writeFileUTF8 (projDir </> "A.daml") $ unlines
|
||||
[ "module A where"
|
||||
]
|
||||
withCurrentDirectory projDir $ callProcessSilent damlc ["build", "-o", "foobar.dar", "--target=1.dev"]
|
||||
withCurrentDirectory projDir $ callProcessSilent damlc ["build", "-o", "foobar.dar", "--target=2.dev"]
|
||||
Right Dalfs{..} <- readDalfs . Zip.toArchive <$> BSL.readFile (projDir </> "foobar.dar")
|
||||
(_pkgId, pkg) <- either (fail . show) pure (LFArchive.decodeArchive LFArchive.DecodeAsMain (BSL.toStrict mainDalf))
|
||||
LF.packageMetadata pkg @?= Just (LF.PackageMetadata (LF.PackageName "foobar") (LF.PackageVersion "1.2.3") Nothing)
|
||||
@ -622,7 +622,7 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, "name: a"
|
||||
, "source: ."
|
||||
, "dependencies: [daml-prim, daml-stdlib]"
|
||||
, "build-options: [--target=1.dev]"
|
||||
, "build-options: [--target=2.dev]"
|
||||
]
|
||||
writeFileUTF8 (tmpDir </> "a" </> "A.daml") $ unlines
|
||||
[ "module A where"
|
||||
@ -641,13 +641,13 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, " - daml-stdlib"
|
||||
, "data-dependencies:"
|
||||
, " - " <> show (tmpDir </> "a" </> "a.dar")
|
||||
, "build-options: [--target=1.14]"
|
||||
, "build-options: [--target=2.1]"
|
||||
]
|
||||
writeFileUTF8 (tmpDir </> "b" </> "B.daml") $ unlines
|
||||
[ "module B where"
|
||||
, "import A ()"
|
||||
]
|
||||
buildProjectError (tmpDir </> "b") "" "Targeted LF version 1.14 but dependencies have incompatible LF versions"
|
||||
buildProjectError (tmpDir </> "b") "" "Targeted LF version 2.1 but dependencies have incompatible LF versions"
|
||||
|
||||
, testCaseSteps "Error on newer LF dependency" $ \step -> withTempDir $ \tmpDir -> do
|
||||
step "Building 'a"
|
||||
@ -658,7 +658,7 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, "name: a"
|
||||
, "source: ."
|
||||
, "dependencies: [daml-prim, daml-stdlib]"
|
||||
, "build-options: [--target=1.dev]"
|
||||
, "build-options: [--target=2.dev]"
|
||||
]
|
||||
writeFileUTF8 (tmpDir </> "a" </> "A.daml") $ unlines
|
||||
[ "module A where"
|
||||
@ -676,13 +676,13 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, " - daml-prim"
|
||||
, " - daml-stdlib"
|
||||
, " - " <> show (tmpDir </> "a" </> "a.dar")
|
||||
, "build-options: [--target=1.14]"
|
||||
, "build-options: [--target=2.1]"
|
||||
]
|
||||
writeFileUTF8 (tmpDir </> "b" </> "B.daml") $ unlines
|
||||
[ "module B where"
|
||||
, "import A ()"
|
||||
]
|
||||
buildProjectError (tmpDir </> "b") "" "Targeted LF version 1.14 but dependencies have different LF versions"
|
||||
buildProjectError (tmpDir </> "b") "" "Targeted LF version 2.1 but dependencies have different LF versions"
|
||||
|
||||
, testCaseSteps "Error on inconsistent LF dependency" $ \step -> withTempDir $ \tmpDir -> do
|
||||
step "Building 'a"
|
||||
@ -693,7 +693,7 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, "name: a"
|
||||
, "source: ."
|
||||
, "dependencies: [daml-prim, daml-stdlib]"
|
||||
, "build-options: [--target=1.14]"
|
||||
, "build-options: [--target=2.1]"
|
||||
]
|
||||
writeFileUTF8 (tmpDir </> "a" </> "A.daml") $ unlines
|
||||
[ "module A where"
|
||||
@ -711,13 +711,13 @@ tests Tools{damlc} = testGroup "Packaging" $
|
||||
, " - daml-prim"
|
||||
, " - daml-stdlib"
|
||||
, " - " <> show (tmpDir </> "a" </> "a.dar")
|
||||
, "build-options: [--target=1.dev]"
|
||||
, "build-options: [--target=2.dev]"
|
||||
]
|
||||
writeFileUTF8 (tmpDir </> "b" </> "B.daml") $ unlines
|
||||
[ "module B where"
|
||||
, "import A ()"
|
||||
]
|
||||
buildProjectError (tmpDir </> "b") "" "Targeted LF version 1.dev but dependencies have different LF versions"
|
||||
buildProjectError (tmpDir </> "b") "" "Targeted LF version 2.dev but dependencies have different LF versions"
|
||||
|
||||
, testCase "build-options + project-root" $ withTempDir $ \projDir -> do
|
||||
createDirectoryIfMissing True (projDir </> "src")
|
||||
|
@ -45,7 +45,6 @@ main = do
|
||||
-- LF 2.x dars.
|
||||
let runCantonInDevMode = major == LF.V2
|
||||
scriptDar <- locateRunfiles $ case major of
|
||||
LF.V1 -> mainWorkspace </> "daml-script" </> "daml" </> "daml-script.dar"
|
||||
LF.V2 -> mainWorkspace </> "daml-script" </> "daml3" </> "daml3-script.dar"
|
||||
testDar <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "tests" </> "repl-test-v" <> prettyMajor <.> "dar")
|
||||
multiTestDar <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "tests" </> "repl-multi-test-v"<> prettyMajor <.>"dar")
|
||||
|
@ -69,7 +69,6 @@ withInteractionTester major action = do
|
||||
setNumCapabilities 1
|
||||
limitJvmMemory defaultJvmMemoryLimits
|
||||
scriptDar <- locateRunfiles $ case major of
|
||||
LF.V1 -> mainWorkspace </> "daml-script" </> "daml" </> "daml-script.dar"
|
||||
LF.V2 -> mainWorkspace </> "daml-script" </> "daml3" </> "daml3-script.dar"
|
||||
testDars <- forM ["repl-test", "repl-test-two"] $ \name ->
|
||||
locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "tests" </> name <> "-v" <> prettyMajor <.> "dar")
|
||||
|
@ -61,7 +61,6 @@ withScriptService lfVersion action =
|
||||
|
||||
-- Package DB setup, we only need to do this once so we do it at the beginning.
|
||||
scriptDar <- locateRunfiles $ case LF.versionMajor lfVersion of
|
||||
LF.V1 -> mainWorkspace </> "daml-script" </> "daml" </> "daml-script.dar"
|
||||
LF.V2 -> mainWorkspace </> "daml-script" </> "daml3" </> "daml3-script.dar"
|
||||
writeFileUTF8 "daml.yaml" $
|
||||
unlines
|
||||
|
@ -33,7 +33,7 @@ import qualified DA.Service.Logger.Impl.IO as Logger
|
||||
import Development.IDE.Core.API.Testing
|
||||
import Development.IDE.Core.Service.Daml(VirtualResource(..))
|
||||
|
||||
import DA.Test.DamlcIntegration (ScriptPackageData, withDamlScriptDep, withDamlScriptV2Dep)
|
||||
import DA.Test.DamlcIntegration (ScriptPackageData, withDamlScriptV2Dep)
|
||||
|
||||
import SdkVersion (SdkVersioned, withSdkVersions)
|
||||
|
||||
@ -61,7 +61,6 @@ test lfVersion scenarioLogger = do
|
||||
where
|
||||
scenarioConfig = SS.defaultScenarioServiceConfig{SS.cnfJvmOptions = ["-Xmx200M"]}
|
||||
withDamlScript = case LF.versionMajor lfVersion of
|
||||
LF.V1 -> withDamlScriptDep
|
||||
LF.V2 -> withDamlScriptV2Dep
|
||||
|
||||
ideTests :: SdkVersioned => LF.Version -> Maybe (IO SS.Handle) -> IO ScriptPackageData -> Tasty.TestTree
|
||||
@ -796,7 +795,6 @@ goToDefinitionTests lfVersion mbScenarioService scriptPackageData = Tasty.testGr
|
||||
expectGoToDefinition
|
||||
(foo, 3, [7..19])
|
||||
(In $ case LF.versionMajor lfVersion of
|
||||
LF.V1 -> "Daml.Script"
|
||||
LF.V2 -> "Daml.Script.Questions.PartyManagement")
|
||||
|
||||
, testCase' "Exception goto definition" $ do
|
||||
|
@ -106,7 +106,6 @@ testsForDamlcValidate damlc = testGroup "damlc validate-dar"
|
||||
step "prepare"
|
||||
writeFileUTF8 (projDir </> "daml.yaml") $ unlines
|
||||
[ "sdk-version: " <> sdkVersion
|
||||
, "build-options: [ --target=1.15 ]"
|
||||
, "name: good"
|
||||
, "version: 0.0.1"
|
||||
, "source: ."
|
||||
@ -132,7 +131,6 @@ testsForDamlcValidate damlc = testGroup "damlc validate-dar"
|
||||
step "prepare"
|
||||
writeFileUTF8 (projDir </> "daml.yaml") $ unlines
|
||||
[ "sdk-version: " <> sdkVersion
|
||||
, "build-options: [ --target=1.15 ]"
|
||||
, "name: good"
|
||||
, "version: 0.0.1"
|
||||
, "source: ."
|
||||
@ -170,7 +168,6 @@ testsForDamlcValidate damlc = testGroup "damlc validate-dar"
|
||||
step "prepare"
|
||||
writeFileUTF8 (projDir </> "daml.yaml") $ unlines
|
||||
[ "sdk-version: " <> sdkVersion
|
||||
, "build-options: [ --target=1.15 ]"
|
||||
, "name: good"
|
||||
, "version: 0.0.1"
|
||||
, "source: ."
|
||||
|
@ -32,37 +32,37 @@ dependencies: [daml-prim, daml-stdlib]
|
||||
EOF
|
||||
mkdir -p $DIR/src
|
||||
|
||||
$DAMLC build --target=1.dev --project-root $DIR -o $DIR/out.dar
|
||||
$DAMLC build --target=2.dev --project-root $DIR -o $DIR/out.dar
|
||||
# The last line is the main dalf which we don’t need. We don’t need to worry about excluding daml-prim
|
||||
# and daml-stdlib since they are only pulled in when necessary and they are clearly not required for
|
||||
# an empty package
|
||||
$DIFF -u -b <($DAMLC inspect-dar $DIR/out.dar | sed '1,/following packages/d' | head -n -1) <(cat <<EOF
|
||||
|
||||
daml-prim-DA-Exception-ArithmeticError-cb0552debf219cc909f51cbb5c3b41e9981d39f8f645b1f35e2ef5be2e0b858a "cb0552debf219cc909f51cbb5c3b41e9981d39f8f645b1f35e2ef5be2e0b858a"
|
||||
daml-prim-DA-Exception-AssertionFailed-3f4deaf145a15cdcfa762c058005e2edb9baa75bb7f95a4f8f6f937378e86415 "3f4deaf145a15cdcfa762c058005e2edb9baa75bb7f95a4f8f6f937378e86415"
|
||||
daml-prim-DA-Exception-GeneralError-86828b9843465f419db1ef8a8ee741d1eef645df02375ebf509cdc8c3ddd16cb "86828b9843465f419db1ef8a8ee741d1eef645df02375ebf509cdc8c3ddd16cb"
|
||||
daml-prim-DA-Exception-PreconditionFailed-f20de1e4e37b92280264c08bf15eca0be0bc5babd7a7b5e574997f154c00cb78 "f20de1e4e37b92280264c08bf15eca0be0bc5babd7a7b5e574997f154c00cb78"
|
||||
daml-prim-DA-Internal-Erased-76bf0fd12bd945762a01f8fc5bbcdfa4d0ff20f8762af490f8f41d6237c6524f "76bf0fd12bd945762a01f8fc5bbcdfa4d0ff20f8762af490f8f41d6237c6524f"
|
||||
daml-prim-DA-Internal-NatSyn-38e6274601b21d7202bb995bc5ec147decda5a01b68d57dda422425038772af7 "38e6274601b21d7202bb995bc5ec147decda5a01b68d57dda422425038772af7"
|
||||
daml-prim-DA-Internal-PromotedText-d58cf9939847921b2aab78eaa7b427dc4c649d25e6bee3c749ace4c3f52f5c97 "d58cf9939847921b2aab78eaa7b427dc4c649d25e6bee3c749ace4c3f52f5c97"
|
||||
daml-prim-DA-Types-40f452260bef3f29dede136108fc08a88d5a5250310281067087da6f0baddff7 "40f452260bef3f29dede136108fc08a88d5a5250310281067087da6f0baddff7"
|
||||
daml-prim-GHC-Prim-e491352788e56ca4603acc411ffe1a49fefd76ed8b163af86cf5ee5f4c38645b "e491352788e56ca4603acc411ffe1a49fefd76ed8b163af86cf5ee5f4c38645b"
|
||||
daml-prim-GHC-Tuple-6839a6d3d430c569b2425e9391717b44ca324b88ba621d597778811b2d05031d "6839a6d3d430c569b2425e9391717b44ca324b88ba621d597778811b2d05031d"
|
||||
daml-prim-GHC-Types-518032f41fd0175461b35ae0c9691e08b4aea55e62915f8360af2cc7a1f2ba6c "518032f41fd0175461b35ae0c9691e08b4aea55e62915f8360af2cc7a1f2ba6c"
|
||||
daml-stdlib-DA-Action-State-Type-10e0333b52bba1ff147fc408a6b7d68465b157635ee230493bd6029b750dcb05 "10e0333b52bba1ff147fc408a6b7d68465b157635ee230493bd6029b750dcb05"
|
||||
daml-stdlib-DA-Date-Types-bfcd37bd6b84768e86e432f5f6c33e25d9e7724a9d42e33875ff74f6348e733f "bfcd37bd6b84768e86e432f5f6c33e25d9e7724a9d42e33875ff74f6348e733f"
|
||||
daml-stdlib-DA-Internal-Any-cc348d369011362a5190fe96dd1f0dfbc697fdfd10e382b9e9666f0da05961b7 "cc348d369011362a5190fe96dd1f0dfbc697fdfd10e382b9e9666f0da05961b7"
|
||||
daml-stdlib-DA-Internal-Down-057eed1fd48c238491b8ea06b9b5bf85a5d4c9275dd3f6183e0e6b01730cc2ba "057eed1fd48c238491b8ea06b9b5bf85a5d4c9275dd3f6183e0e6b01730cc2ba"
|
||||
daml-stdlib-DA-Internal-Interface-AnyView-Types-6df2d1fd8ea994ed048a79587b2722e3a887ac7592abf31ecf46fe09ac02d689 "6df2d1fd8ea994ed048a79587b2722e3a887ac7592abf31ecf46fe09ac02d689"
|
||||
daml-stdlib-DA-Internal-Template-d14e08374fc7197d6a0de468c968ae8ba3aadbf9315476fd39071831f5923662 "d14e08374fc7197d6a0de468c968ae8ba3aadbf9315476fd39071831f5923662"
|
||||
daml-stdlib-DA-Logic-Types-c1f1f00558799eec139fb4f4c76f95fb52fa1837a5dd29600baa1c8ed1bdccfd "c1f1f00558799eec139fb4f4c76f95fb52fa1837a5dd29600baa1c8ed1bdccfd"
|
||||
daml-stdlib-DA-Monoid-Types-6c2c0667393c5f92f1885163068cd31800d2264eb088eb6fc740e11241b2bf06 "6c2c0667393c5f92f1885163068cd31800d2264eb088eb6fc740e11241b2bf06"
|
||||
daml-stdlib-DA-NonEmpty-Types-e22bce619ae24ca3b8e6519281cb5a33b64b3190cc763248b4c3f9ad5087a92c "e22bce619ae24ca3b8e6519281cb5a33b64b3190cc763248b4c3f9ad5087a92c"
|
||||
daml-stdlib-DA-Random-Types-e4cc67c3264eba4a19c080cac5ab32d87551578e0f5f58b6a9460f91c7abc254 "e4cc67c3264eba4a19c080cac5ab32d87551578e0f5f58b6a9460f91c7abc254"
|
||||
daml-stdlib-DA-Semigroup-Types-8a7806365bbd98d88b4c13832ebfa305f6abaeaf32cfa2b7dd25c4fa489b79fb "8a7806365bbd98d88b4c13832ebfa305f6abaeaf32cfa2b7dd25c4fa489b79fb"
|
||||
daml-stdlib-DA-Set-Types-97b883cd8a2b7f49f90d5d39c981cf6e110cf1f1c64427a28a6d58ec88c43657 "97b883cd8a2b7f49f90d5d39c981cf6e110cf1f1c64427a28a6d58ec88c43657"
|
||||
daml-stdlib-DA-Stack-Types-5921708ce82f4255deb1b26d2c05358b548720938a5a325718dc69f381ba47ff "5921708ce82f4255deb1b26d2c05358b548720938a5a325718dc69f381ba47ff"
|
||||
daml-stdlib-DA-Time-Types-733e38d36a2759688a4b2c4cec69d48e7b55ecc8dedc8067b815926c917a182a "733e38d36a2759688a4b2c4cec69d48e7b55ecc8dedc8067b815926c917a182a"
|
||||
daml-stdlib-DA-Validation-Types-99a2705ed38c1c26cbb8fe7acf36bbf626668e167a33335de932599219e0a235 "99a2705ed38c1c26cbb8fe7acf36bbf626668e167a33335de932599219e0a235"
|
||||
daml-prim-DA-Exception-ArithmeticError-0e35772044c88dda5159f70a9170eae0f07e2f1942af4ab401e7cd79166e8c94 "0e35772044c88dda5159f70a9170eae0f07e2f1942af4ab401e7cd79166e8c94"
|
||||
daml-prim-DA-Exception-AssertionFailed-ffc462638e7338aaf5d45b3eae8aba5d8e9259a2e44d1ec9db70ed4ee83601e0 "ffc462638e7338aaf5d45b3eae8aba5d8e9259a2e44d1ec9db70ed4ee83601e0"
|
||||
daml-prim-DA-Exception-GeneralError-48426ca53c6510a1d641cdc05dd5b3cea288bd4bcd54311ffaa284b5097d4b9d "48426ca53c6510a1d641cdc05dd5b3cea288bd4bcd54311ffaa284b5097d4b9d"
|
||||
daml-prim-DA-Exception-PreconditionFailed-4d035c16dee0b8d75814624a05de9fcb062e942ff3b3b60d913335b468a84789 "4d035c16dee0b8d75814624a05de9fcb062e942ff3b3b60d913335b468a84789"
|
||||
daml-prim-DA-Internal-Erased-71ca307ec24fc584d601fd6d5f49ec76d100730f56eef290e41248f32ccadfb1 "71ca307ec24fc584d601fd6d5f49ec76d100730f56eef290e41248f32ccadfb1"
|
||||
daml-prim-DA-Internal-NatSyn-eb6926e50bb83fbc8f3e154c7c88b1219b31a3c0b812f26b276d46e212c2dd71 "eb6926e50bb83fbc8f3e154c7c88b1219b31a3c0b812f26b276d46e212c2dd71"
|
||||
daml-prim-DA-Internal-PromotedText-c2bac57e7a921c98523ae40766bfefab9f5b7bf4bf34e1c09d9a9d1483417b6c "c2bac57e7a921c98523ae40766bfefab9f5b7bf4bf34e1c09d9a9d1483417b6c"
|
||||
daml-prim-DA-Types-87530dd1038863bad7bdf02c59ae851bc00f469edb2d7dbc8be3172daafa638c "87530dd1038863bad7bdf02c59ae851bc00f469edb2d7dbc8be3172daafa638c"
|
||||
daml-prim-GHC-Prim-37375ebfb7ebef8a38aa0d037db55833bcac40eb04074b9024ed81c249ea2387 "37375ebfb7ebef8a38aa0d037db55833bcac40eb04074b9024ed81c249ea2387"
|
||||
daml-prim-GHC-Tuple-afbf83d4d9ef0fb1a4ee4d1d6bef98b5cea044a6d395c1c27834abd7e8eb57ae "afbf83d4d9ef0fb1a4ee4d1d6bef98b5cea044a6d395c1c27834abd7e8eb57ae"
|
||||
daml-prim-GHC-Types-2f07eb3e4731beccfd88fcd19177268f120f9a2b06a52534ee808a4ba1e89720 "2f07eb3e4731beccfd88fcd19177268f120f9a2b06a52534ee808a4ba1e89720"
|
||||
daml-stdlib-DA-Action-State-Type-2d7314e12cc21ce1482d7a59ab8b42f8deafbe3cdb62eae9fcd4f583ba0ad8d0 "2d7314e12cc21ce1482d7a59ab8b42f8deafbe3cdb62eae9fcd4f583ba0ad8d0"
|
||||
daml-stdlib-DA-Date-Types-a4c44a89461229bb4a4fddbdeabe3f9dfaf6db35896c87d76f638cd45e1f0678 "a4c44a89461229bb4a4fddbdeabe3f9dfaf6db35896c87d76f638cd45e1f0678"
|
||||
daml-stdlib-DA-Internal-Any-7de198711a7a5b3c897eff937b85811438d22f48452a118222590b0ec080bf54 "7de198711a7a5b3c897eff937b85811438d22f48452a118222590b0ec080bf54"
|
||||
daml-stdlib-DA-Internal-Down-35df06619756af233f13051ba77718e172589b979d22dd3ec40c8787563bb435 "35df06619756af233f13051ba77718e172589b979d22dd3ec40c8787563bb435"
|
||||
daml-stdlib-DA-Internal-Interface-AnyView-Types-db7b27684bd900f7ca47c854d526eeaffd9e84d761859c66cc6cf5957ad89ed4 "db7b27684bd900f7ca47c854d526eeaffd9e84d761859c66cc6cf5957ad89ed4"
|
||||
daml-stdlib-DA-Internal-Template-c2eed01333d3c95b12ca5ef0f196db5cd481c58902e01c8ac6b1e49a62875aa5 "c2eed01333d3c95b12ca5ef0f196db5cd481c58902e01c8ac6b1e49a62875aa5"
|
||||
daml-stdlib-DA-Logic-Types-19cfdcbac283f2a26c05bfcea437177cfb7adb0b2eb8aa82944e91b13b671912 "19cfdcbac283f2a26c05bfcea437177cfb7adb0b2eb8aa82944e91b13b671912"
|
||||
daml-stdlib-DA-Monoid-Types-bb581ddc78c4c0e682727d9a2302dc1eba5941809c528aca149a5fdaf25c6cbd "bb581ddc78c4c0e682727d9a2302dc1eba5941809c528aca149a5fdaf25c6cbd"
|
||||
daml-stdlib-DA-NonEmpty-Types-d3a94c9e99da7fbb5e35d52d05eec84db27233d4c1aed75548dba1057c84ad81 "d3a94c9e99da7fbb5e35d52d05eec84db27233d4c1aed75548dba1057c84ad81"
|
||||
daml-stdlib-DA-Random-Types-58f4cb7b68a305d056a067c03083f80550ed7d98d6fe100a5ddfa282851ba49a "58f4cb7b68a305d056a067c03083f80550ed7d98d6fe100a5ddfa282851ba49a"
|
||||
daml-stdlib-DA-Semigroup-Types-ceb729ab26af3934f35fb803534d633c4dd37b466888afcced34a32155e9c2cd "ceb729ab26af3934f35fb803534d633c4dd37b466888afcced34a32155e9c2cd"
|
||||
daml-stdlib-DA-Set-Types-9d88bb9904dab8f44a47e4f27c8d8ee4fc57fece9c2e3d385ef7ed19fcc24049 "9d88bb9904dab8f44a47e4f27c8d8ee4fc57fece9c2e3d385ef7ed19fcc24049"
|
||||
daml-stdlib-DA-Stack-Types-747f749a860db32a01ae0c5c741e6648497b93ffcfef3948854c31cc8167eacf "747f749a860db32a01ae0c5c741e6648497b93ffcfef3948854c31cc8167eacf"
|
||||
daml-stdlib-DA-Time-Types-b47113ba94c31372c553e3869fffed9a45ef1c0f5ac1be3287857cd9450c0bae "b47113ba94c31372c553e3869fffed9a45ef1c0f5ac1be3287857cd9450c0bae"
|
||||
daml-stdlib-DA-Validation-Types-4687117abb53238857bccdb0d00be7fc005eb334e1f232de3d78152b90b3f202 "4687117abb53238857bccdb0d00be7fc005eb334e1f232de3d78152b90b3f202"
|
||||
EOF
|
||||
)
|
||||
|
@ -225,7 +225,7 @@ packagingTests tmpDir =
|
||||
, "name: proj"
|
||||
, "version: 0.0.1"
|
||||
, "source: ."
|
||||
, "dependencies: [daml-prim, daml-stdlib, daml-script]"
|
||||
, "dependencies: [daml-prim, daml-stdlib, daml3-script]"
|
||||
, "data-dependencies: [" <>
|
||||
show (tmpDir </> "data-dependency" </> "data-dependency.dar") <>
|
||||
"]"
|
||||
|
@ -14,7 +14,6 @@ import com.daml.lf.testing.parser.ParserParameters
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class TypeSpecV1 extends TypeSpec(LanguageMajorVersion.V1)
|
||||
class TypeSpecV2 extends TypeSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class TypeSpec(majorLanguageVersion: LanguageMajorVersion) extends AnyWordSpec with Matchers {
|
||||
|
@ -69,7 +69,10 @@ genrule(
|
||||
name = "daml_lf_dev_archive_haskell_proto_src",
|
||||
srcs = ["daml_lf_dev_archive_proto_srcs"],
|
||||
outs = ["Com/Daml/DamlLfDev/DamlLf.hs"] +
|
||||
["Com/Daml/DamlLfDev/DamlLf%s.hs" % v.title() for v in LF_MAJOR_VERSIONS],
|
||||
["Com/Daml/DamlLfDev/DamlLf%s.hs" % v.title() for v in [
|
||||
"1",
|
||||
"2",
|
||||
]],
|
||||
cmd =
|
||||
"\n".join(
|
||||
[
|
||||
@ -79,7 +82,10 @@ genrule(
|
||||
--proto com/daml/daml_lf_dev/daml_lf%s.proto \
|
||||
--out $(@D)
|
||||
""" % vx
|
||||
for vx in [""] + ["%s" % v for v in LF_MAJOR_VERSIONS]
|
||||
for vx in [""] + ["%s" % v for v in [
|
||||
"1",
|
||||
"2",
|
||||
]]
|
||||
],
|
||||
),
|
||||
tools = [
|
||||
|
@ -7,7 +7,7 @@ import java.io.File
|
||||
|
||||
import com.daml.bazeltools.BazelRunfiles
|
||||
import com.daml.lf.language.LanguageMajorVersion
|
||||
import com.daml.daml_lf_dev.DamlLf1
|
||||
import com.daml.daml_lf_dev.DamlLf2
|
||||
import org.scalatest._
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
@ -42,13 +42,13 @@ class DarReaderTest
|
||||
|
||||
forAll(dar.all) { case ArchivePayload(packageId, archive, ver) =>
|
||||
packageId shouldNot be(Symbol("empty"))
|
||||
archive.getDamlLf1.getModulesCount should be > 0
|
||||
ver.major should be(LanguageMajorVersion.V1)
|
||||
archive.getDamlLf2.getModulesCount should be > 0
|
||||
ver.major should be(LanguageMajorVersion.V2)
|
||||
}
|
||||
|
||||
val mainArchiveModules = mainArchive.getDamlLf1.getModulesList.asScala
|
||||
val mainArchiveInternedDotted = mainArchive.getDamlLf1.getInternedDottedNamesList.asScala
|
||||
val mainArchiveInternedStrings = mainArchive.getDamlLf1.getInternedStringsList.asScala
|
||||
val mainArchiveModules = mainArchive.getDamlLf2.getModulesList.asScala
|
||||
val mainArchiveInternedDotted = mainArchive.getDamlLf2.getInternedDottedNamesList.asScala
|
||||
val mainArchiveInternedStrings = mainArchive.getDamlLf2.getInternedStringsList.asScala
|
||||
inside(
|
||||
mainArchiveModules
|
||||
.find(m =>
|
||||
@ -60,7 +60,7 @@ class DarReaderTest
|
||||
)
|
||||
) { case Some(module) =>
|
||||
val actualTypes: Set[String] =
|
||||
module.getDataTypesList.asScala.toSet.map((t: DamlLf1.DefDataType) =>
|
||||
module.getDataTypesList.asScala.toSet.map((t: DamlLf2.DefDataType) =>
|
||||
internedName(
|
||||
mainArchiveInternedDotted,
|
||||
mainArchiveInternedStrings,
|
||||
@ -71,9 +71,9 @@ class DarReaderTest
|
||||
}
|
||||
|
||||
forExactly(1, dar.dependencies) { case ArchivePayload(_, archive, _) =>
|
||||
val archiveModules = archive.getDamlLf1.getModulesList.asScala
|
||||
val archiveInternedDotted = archive.getDamlLf1.getInternedDottedNamesList.asScala
|
||||
val archiveInternedStrings = archive.getDamlLf1.getInternedStringsList.asScala
|
||||
val archiveModules = archive.getDamlLf2.getModulesList.asScala
|
||||
val archiveInternedDotted = archive.getDamlLf2.getInternedDottedNamesList.asScala
|
||||
val archiveInternedStrings = archive.getDamlLf2.getInternedStringsList.asScala
|
||||
val archiveModuleNames = archiveModules
|
||||
.map(m =>
|
||||
internedName(archiveInternedDotted, archiveInternedStrings, m.getNameInternedDname)
|
||||
@ -96,7 +96,7 @@ class DarReaderTest
|
||||
}
|
||||
|
||||
private def internedName(
|
||||
internedDotted: collection.Seq[DamlLf1.InternedDottedName],
|
||||
internedDotted: collection.Seq[DamlLf2.InternedDottedName],
|
||||
internedStrings: collection.Seq[String],
|
||||
n: Int,
|
||||
): String = {
|
||||
|
@ -10,7 +10,7 @@ import com.daml.lf.data.{Decimal, Numeric, Ref}
|
||||
import com.daml.lf.language.Util._
|
||||
import com.daml.lf.language.{Ast, LanguageVersion => LV}
|
||||
import com.daml.lf.data.ImmArray.ImmArraySeq
|
||||
import com.daml.daml_lf_dev.DamlLf1
|
||||
import com.daml.daml_lf_dev.{DamlLf1, DamlLf2}
|
||||
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
|
||||
import org.scalatest.{Inside, OptionValues}
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
@ -1465,7 +1465,7 @@ class DecodeCommonSpec
|
||||
ArchiveReader.fromFile(Paths.get(rlocation("daml-lf/archive/DarReaderTest.dalf")))
|
||||
|
||||
lazy val extId = {
|
||||
val dalf1 = dalfProto.getDamlLf1
|
||||
val dalf1 = dalfProto.getDamlLf2
|
||||
val iix = dalf1
|
||||
.getModules(0)
|
||||
.getValuesList
|
||||
@ -1479,7 +1479,7 @@ class DecodeCommonSpec
|
||||
.lastOption
|
||||
.map(x => dalf1.getInternedStringsList.asScala(x)) contains "reverseCopy" =>
|
||||
val pr = dv.getExpr.getVal.getModule.getPackageRef
|
||||
pr.getSumCase shouldBe DamlLf1.PackageRef.SumCase.PACKAGE_ID_INTERNED_STR
|
||||
pr.getSumCase shouldBe DamlLf2.PackageRef.SumCase.PACKAGE_ID_INTERNED_STR
|
||||
pr.getPackageIdInternedStr
|
||||
}
|
||||
.value
|
||||
@ -1487,7 +1487,7 @@ class DecodeCommonSpec
|
||||
}
|
||||
|
||||
"take a dalf with interned IDs" in {
|
||||
version.major should ===(LV.Major.V1)
|
||||
version.major should ===(LV.Major.V2)
|
||||
|
||||
version.minor should !==("dev")
|
||||
|
||||
@ -1496,8 +1496,8 @@ class DecodeCommonSpec
|
||||
}
|
||||
|
||||
"decode resolving the interned package ID" in {
|
||||
val decoder = new DecodeCommon(version)
|
||||
inside(decoder.decodePackage(pkgId, dalfProto.getDamlLf1, false)) { case Right(pkg) =>
|
||||
val decoder = new DecodeV2(version.minor)
|
||||
inside(decoder.decodePackage(pkgId, dalfProto.getDamlLf2, false)) { case Right(pkg) =>
|
||||
inside(
|
||||
pkg
|
||||
.modules(Ref.DottedName.assertFromString("DarReaderTest"))
|
||||
|
@ -12,7 +12,6 @@ import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
import java.io.File
|
||||
|
||||
class StablePackageTestV1 extends StablePackageTest(LanguageMajorVersion.V1)
|
||||
class StablePackageTestV2 extends StablePackageTest(LanguageMajorVersion.V2)
|
||||
|
||||
class StablePackageTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -11,7 +11,7 @@ load(
|
||||
)
|
||||
load(
|
||||
"//daml-lf/language:daml-lf.bzl",
|
||||
"LF_VERSIONS",
|
||||
"ENGINE_LF_VERSIONS",
|
||||
"lf_version_configuration",
|
||||
"lf_version_is_dev",
|
||||
"mangle_for_java",
|
||||
@ -45,7 +45,7 @@ da_scala_test_suite(
|
||||
name = "tests",
|
||||
size = "small",
|
||||
srcs = glob(["src/test/scala/**/*.scala"]),
|
||||
data = [":testing-dar-%s" % target for target in LF_VERSIONS],
|
||||
data = [":testing-dar-%s" % target for target in ENGINE_LF_VERSIONS],
|
||||
scala_deps = [
|
||||
"@maven//:org_scalatest_scalatest_core",
|
||||
"@maven//:org_scalatest_scalatest_matchers_core",
|
||||
@ -100,7 +100,7 @@ da_scala_binary(
|
||||
"src/test/lf/*_%s_*.lf" % target,
|
||||
]),
|
||||
)
|
||||
for target in LF_VERSIONS
|
||||
for target in ENGINE_LF_VERSIONS
|
||||
]
|
||||
|
||||
[
|
||||
@ -112,7 +112,7 @@ da_scala_binary(
|
||||
tools = [":encoder_binary"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
for target in LF_VERSIONS
|
||||
for target in ENGINE_LF_VERSIONS
|
||||
]
|
||||
|
||||
[
|
||||
@ -136,7 +136,7 @@ da_scala_binary(
|
||||
"@bazel_tools//tools/bash/runfiles",
|
||||
],
|
||||
)
|
||||
for target in LF_VERSIONS
|
||||
for target in ENGINE_LF_VERSIONS
|
||||
]
|
||||
|
||||
[
|
||||
@ -176,6 +176,6 @@ EOF
|
||||
|
||||
filegroup(
|
||||
name = "testing-dars",
|
||||
srcs = ["testing-dar-%s" % version for version in LF_VERSIONS],
|
||||
srcs = ["testing-dar-%s" % version for version in ENGINE_LF_VERSIONS],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
@ -62,7 +62,8 @@ class DamlLfEncoderTest
|
||||
val modules_1_14 = modules_1_13 + "ExceptionMod"
|
||||
val modules_1_15 = modules_1_14 + "InterfaceMod" + "InterfaceMod0"
|
||||
val modules_1_dev = modules_1_15 + "InterfaceExtMod"
|
||||
val modules_2_dev = modules_1_dev
|
||||
val modules_2_1 = modules_1_dev
|
||||
val modules_2_dev = modules_2_1
|
||||
|
||||
val versions = Table(
|
||||
"versions" -> "modules",
|
||||
@ -72,6 +73,7 @@ class DamlLfEncoderTest
|
||||
"1.14" -> modules_1_14,
|
||||
"1.15" -> modules_1_15,
|
||||
"1.dev" -> modules_1_dev,
|
||||
"2.1" -> modules_2_1,
|
||||
"2.dev" -> modules_2_dev,
|
||||
)
|
||||
|
||||
|
@ -14,7 +14,6 @@ import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.prop._
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
class PackageInterfaceSpecV1 extends PackageInterfaceSpec(LanguageMajorVersion.V1)
|
||||
class PackageInterfaceSpecV2 extends PackageInterfaceSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class PackageInterfaceSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -21,7 +21,6 @@ import com.daml.lf.speedy.Compiler
|
||||
|
||||
import scala.util.{Failure, Success, Try}
|
||||
|
||||
class ApiCommandPreprocessorSpecV1 extends ApiCommandPreprocessorSpec(LanguageMajorVersion.V1)
|
||||
class ApiCommandPreprocessorSpecV2 extends ApiCommandPreprocessorSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class ApiCommandPreprocessorSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -35,7 +35,6 @@ import org.scalatest.matchers.should.Matchers
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class AuthPropagationSpecV1 extends AuthPropagationSpec(LanguageMajorVersion.V1)
|
||||
class AuthPropagationSpecV2 extends AuthPropagationSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class AuthPropagationSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -40,7 +40,6 @@ import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class ContractKeySpecV1 extends ContractKeySpec(LanguageMajorVersion.V1)
|
||||
class ContractKeySpecV2 extends ContractKeySpec(LanguageMajorVersion.V2)
|
||||
|
||||
@SuppressWarnings(
|
||||
|
@ -58,7 +58,6 @@ import scala.collection.immutable.HashMap
|
||||
import scala.language.implicitConversions
|
||||
import scala.math.Ordered.orderingToOrdered
|
||||
|
||||
class EngineTestV1 extends EngineTest(LanguageMajorVersion.V1)
|
||||
class EngineTestV2 extends EngineTest(LanguageMajorVersion.V2)
|
||||
|
||||
@SuppressWarnings(
|
||||
|
@ -12,7 +12,6 @@ import org.scalatest.Inside
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
class EngineValidatePackagesTestV1 extends EngineValidatePackagesTest(LanguageMajorVersion.V1)
|
||||
class EngineValidatePackagesTestV2 extends EngineValidatePackagesTest(LanguageMajorVersion.V2)
|
||||
|
||||
class EngineValidatePackagesTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -23,7 +23,6 @@ import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class InterfaceViewSpecV1 extends InterfaceViewSpec(LanguageMajorVersion.V1)
|
||||
class InterfaceViewSpecV2 extends InterfaceViewSpec(LanguageMajorVersion.V2)
|
||||
|
||||
@SuppressWarnings(
|
||||
|
@ -27,7 +27,6 @@ import interpretation.{Error => IE}
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class InterfacesTestV1 extends InterfacesTest(LanguageMajorVersion.V1)
|
||||
class InterfacesTestV2 extends InterfacesTest(LanguageMajorVersion.V2)
|
||||
|
||||
@SuppressWarnings(
|
||||
|
@ -24,7 +24,6 @@ import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class LargeTransactionTestV1 extends LargeTransactionTest(LanguageMajorVersion.V1)
|
||||
class LargeTransactionTestV2 extends LargeTransactionTest(LanguageMajorVersion.V2)
|
||||
|
||||
class LargeTransactionTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -16,7 +16,6 @@ import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
class MetaDataTestV1 extends MetaDataTest(LanguageMajorVersion.V1)
|
||||
class MetaDataTestV2 extends MetaDataTest(LanguageMajorVersion.V2)
|
||||
|
||||
class MetaDataTest(majorVersion: LanguageMajorVersion)
|
||||
|
@ -17,7 +17,6 @@ import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
import java.io.File
|
||||
|
||||
class NodeSeedsTestV1 extends NodeSeedsTest(LanguageMajorVersion.V1)
|
||||
class NodeSeedsTestV2 extends NodeSeedsTest(LanguageMajorVersion.V2)
|
||||
|
||||
class NodeSeedsTest(majorLanguageVersion: LanguageMajorVersion) extends AnyWordSpec with Matchers {
|
||||
|
@ -15,7 +15,6 @@ import org.scalatest.matchers.should.Matchers
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class PackageInfoSpecV1 extends PackageInfoSpec(LanguageMajorVersion.V1)
|
||||
class PackageInfoSpecV2 extends PackageInfoSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class PackageInfoSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -22,7 +22,6 @@ import com.daml.lf.value.Value
|
||||
import com.daml.lf.speedy.Compiler
|
||||
import com.daml.lf.transaction.Util
|
||||
|
||||
class PreprocessorSpecV1 extends PreprocessorSpec(LanguageMajorVersion.V1)
|
||||
class PreprocessorSpecV2 extends PreprocessorSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class PreprocessorSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -23,7 +23,6 @@ import org.scalatest.matchers.should.Matchers
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class ReinterpretTestV1 extends ReinterpretTest(LanguageMajorVersion.V1)
|
||||
class ReinterpretTestV2 extends ReinterpretTest(LanguageMajorVersion.V2)
|
||||
|
||||
class ReinterpretTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -20,7 +20,6 @@ import com.daml.lf.speedy.Compiler
|
||||
|
||||
import scala.util.{Failure, Success, Try}
|
||||
|
||||
class ReplayCommandPreprocessorSpecV1 extends ReplayCommandPreprocessorSpec(LanguageMajorVersion.V1)
|
||||
class ReplayCommandPreprocessorSpecV2 extends ReplayCommandPreprocessorSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class ReplayCommandPreprocessorSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -20,7 +20,6 @@ import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
class ValueEnricherSpecV1 extends ValueEnricherSpec(LanguageMajorVersion.V1)
|
||||
class ValueEnricherSpecV2 extends ValueEnricherSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class ValueEnricherSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -21,7 +21,6 @@ import com.daml.lf.speedy.Compiler
|
||||
|
||||
import scala.util.{Failure, Success, Try}
|
||||
|
||||
class ValueTranslatorSpecV1 extends ValueTranslatorSpec(LanguageMajorVersion.V1)
|
||||
class ValueTranslatorSpecV2 extends ValueTranslatorSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class ValueTranslatorSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -23,7 +23,6 @@ import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
|
||||
import util.{Failure, Success, Try}
|
||||
|
||||
class SBuiltinInterfaceTestV1 extends SBuiltinInterfaceTest(LanguageMajorVersion.V1)
|
||||
class SBuiltinInterfaceTestV2 extends SBuiltinInterfaceTest(LanguageMajorVersion.V2)
|
||||
|
||||
class SBuiltinInterfaceTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -19,7 +19,6 @@ import org.scalatest.Inside
|
||||
import org.scalatest.freespec.AnyFreeSpec
|
||||
import org.scalatest.matchers.should.Matchers._
|
||||
|
||||
class ChoiceAuthorityTestV1 extends ChoiceAuthorityTest(LanguageMajorVersion.V1)
|
||||
class ChoiceAuthorityTestV2 extends ChoiceAuthorityTest(LanguageMajorVersion.V2)
|
||||
|
||||
class ChoiceAuthorityTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -14,7 +14,6 @@ import org.scalatest.prop.{TableDrivenPropertyChecks, TableFor2}
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
class ComparisonSBuiltinTestV1 extends ComparisonSBuiltinTest(LanguageMajorVersion.V1)
|
||||
class ComparisonSBuiltinTestV2 extends ComparisonSBuiltinTest(LanguageMajorVersion.V2)
|
||||
|
||||
class ComparisonSBuiltinTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -29,7 +29,6 @@ import org.scalatest.Inside
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
class CompilerTestV1 extends CompilerTest(LanguageMajorVersion.V1)
|
||||
class CompilerTestV2 extends CompilerTest(LanguageMajorVersion.V2)
|
||||
|
||||
class CompilerTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -24,7 +24,6 @@ import org.scalatest.freespec.AnyFreeSpec
|
||||
import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
|
||||
class ExceptionTestV1 extends ExceptionTest(LanguageMajorVersion.V1)
|
||||
class ExceptionTestV2 extends ExceptionTest(LanguageMajorVersion.V2)
|
||||
|
||||
// TEST_EVIDENCE: Integrity: Exceptions, throw/catch.
|
||||
|
@ -19,7 +19,6 @@ import com.daml.lf.speedy.Speedy.ContractInfo
|
||||
import com.daml.lf.transaction.GlobalKeyWithMaintainers
|
||||
import com.daml.lf.testing.parser.Implicits._
|
||||
|
||||
class ExplicitDisclosureTestV1 extends ExplicitDisclosureTest(LanguageMajorVersion.V1)
|
||||
class ExplicitDisclosureTestV2 extends ExplicitDisclosureTest(LanguageMajorVersion.V2)
|
||||
|
||||
private[lf] class ExplicitDisclosureTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -21,7 +21,6 @@ import com.daml.logging.ContextualizedLogger
|
||||
|
||||
import scala.language.implicitConversions
|
||||
|
||||
class InterpreterTestV1 extends InterpreterTest(LanguageMajorVersion.V1)
|
||||
class InterpreterTestV2 extends InterpreterTest(LanguageMajorVersion.V2)
|
||||
|
||||
class InterpreterTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -16,7 +16,6 @@ import org.scalatest.freespec.AnyFreeSpec
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
|
||||
class LimitsSpecV1 extends LimitsSpec(LanguageMajorVersion.V1)
|
||||
class LimitsSpecV2 extends LimitsSpec(LanguageMajorVersion.V2)
|
||||
|
||||
class LimitsSpec(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
@ -18,7 +18,6 @@ import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
|
||||
|
||||
import scala.jdk.CollectionConverters._
|
||||
|
||||
class ProfilerTestV1 extends ProfilerTest(LanguageMajorVersion.V1)
|
||||
class ProfilerTestV2 extends ProfilerTest(LanguageMajorVersion.V2)
|
||||
|
||||
class ProfilerTest(majorLanguageVersion: LanguageMajorVersion)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user