mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
damlc: Drop support for reading DAML-LF 1.5 (#5294)
DAML-LF 1.6 is the baseline vesion we want to support with the next SDK release. CHANGELOG_BEGIN - [DAML Compiler] Drop support for reading DARs using DAML-LF 1.5. Please recompile your DAML to a newer DAML-LF version in case you have such DARs. CHANGELOG_END
This commit is contained in:
parent
a9ca9d3956
commit
66653810ab
@ -19,10 +19,6 @@ data Version
|
||||
data MinorVersion = PointStable Int | PointDev
|
||||
deriving (Eq, Data, Generic, NFData, Ord, Show)
|
||||
|
||||
-- | DAML-LF version 1.5
|
||||
version1_5 :: Version
|
||||
version1_5 = V1 $ PointStable 5
|
||||
|
||||
-- | DAML-LF version 1.6
|
||||
version1_6 :: Version
|
||||
version1_6 = V1 $ PointStable 6
|
||||
@ -47,7 +43,7 @@ supportedOutputVersions :: [Version]
|
||||
supportedOutputVersions = [version1_6, version1_7, version1_8, versionDev]
|
||||
|
||||
supportedInputVersions :: [Version]
|
||||
supportedInputVersions = version1_5 : supportedOutputVersions
|
||||
supportedInputVersions = supportedOutputVersions
|
||||
|
||||
|
||||
data Feature = Feature
|
||||
|
@ -1,15 +0,0 @@
|
||||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates.
|
||||
-- All rights reserved.
|
||||
|
||||
-- Check that conversion between text and code points works.
|
||||
-- @SINCE-LF 1.6
|
||||
-- @TODO Move this into Text.daml once support for DAML-LF 1.5 is dropped.
|
||||
|
||||
module GoodCodePoints where
|
||||
|
||||
import DA.Assert
|
||||
import DA.Text qualified as T
|
||||
|
||||
testCodePoints = scenario do
|
||||
T.toCodePoints "Hello" === [72, 101, 108, 108, 111]
|
||||
T.fromCodePoints [87, 111, 114, 108, 100] === "World"
|
@ -1,95 +0,0 @@
|
||||
-- Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
-- @UNTIL-LF 1.5
|
||||
--
|
||||
-- Tests that DAML-LF <= 1.5 does not enforce "submitter
|
||||
-- must be in maintainer" rule. See https://github.com/digital-asset/daml/issues/1866
|
||||
|
||||
module SubmitterInMaintainers_before_1866 where
|
||||
|
||||
-- import DA.Assert
|
||||
|
||||
template Delegated
|
||||
with
|
||||
owner : Party
|
||||
k : Text
|
||||
where
|
||||
signatory owner
|
||||
key (owner, k) : (Party, Text)
|
||||
maintainer key._1
|
||||
|
||||
template Delegation
|
||||
with
|
||||
owner : Party
|
||||
delegate : Party
|
||||
where
|
||||
signatory owner
|
||||
observer delegate
|
||||
|
||||
controller delegate can
|
||||
nonconsuming FetchDelegated: Delegated
|
||||
with delegated: ContractId Delegated
|
||||
do fetch delegated
|
||||
|
||||
controller delegate can
|
||||
nonconsuming FetchByKeyDelegated: ()
|
||||
with
|
||||
p: Party
|
||||
k: Text
|
||||
expected: ContractId Delegated
|
||||
do
|
||||
(cid, _) <- fetchByKey @Delegated (p, k)
|
||||
assertMsg "fetch matches" (expected == cid)
|
||||
|
||||
controller delegate can
|
||||
nonconsuming LookupByKeyDelegated: ()
|
||||
with
|
||||
p: Party
|
||||
k: Text
|
||||
expected: Optional (ContractId Delegated)
|
||||
do
|
||||
actual <- lookupByKey @Delegated (p, k)
|
||||
assertMsg "lookup matches" (expected == actual)
|
||||
|
||||
template ShowDelegated
|
||||
with
|
||||
owner: Party
|
||||
delegate: Party
|
||||
where
|
||||
signatory owner
|
||||
observer delegate
|
||||
controller owner can
|
||||
ShowIt : ()
|
||||
with delegatedId: ContractId Delegated
|
||||
do
|
||||
fetch delegatedId
|
||||
return ()
|
||||
|
||||
setup = do
|
||||
owner <- getParty "owner"
|
||||
delegate <- getParty "delegate"
|
||||
delegated <- owner `submit` create Delegated with owner, k = "key"
|
||||
delegation <- owner `submit` create Delegation with owner, delegate
|
||||
return (owner, delegate, delegated, delegation)
|
||||
|
||||
-- mirrors "reject fetching an undisclosed contract" in
|
||||
-- in `CommandTransactionChecks.scala`
|
||||
rejectsFetchingAnUndlisclosedContract = scenario do
|
||||
(owner, delegate, delegated, delegation) <- setup
|
||||
delegate `submitMustFail` exercise delegation FetchDelegated with delegated
|
||||
-- this fetch still fails even if we do not check that the submitter
|
||||
-- is in the lookup maintainer, since we have the visibility check
|
||||
-- implement as part of #753.
|
||||
delegate `submitMustFail` exercise delegation FetchByKeyDelegated with p = owner, k = "key", expected = delegated
|
||||
delegate `submit` exercise delegation LookupByKeyDelegated with p = owner, k = "key", expected = None
|
||||
|
||||
-- mirrors "permit fetching a divulged contract" in
|
||||
-- in `CommandTransactionChecks.scala`
|
||||
permitFetchingADivulgedContract = scenario do
|
||||
(owner, delegate, delegated, delegation) <- setup
|
||||
showId <- owner `submit` create ShowDelegated with owner, delegate
|
||||
owner `submit` exercise showId ShowIt with delegatedId = delegated
|
||||
delegate `submit` exercise delegation FetchDelegated with delegated
|
||||
delegate `submit` exercise delegation FetchByKeyDelegated with p = owner, k = "key", expected = delegated
|
||||
delegate `submit` exercise delegation LookupByKeyDelegated with p = owner, k = "key", expected = Some delegated
|
@ -303,3 +303,7 @@ testNuls = scenario do
|
||||
T.reverse "\0\1\2\3" === "\3\2\1\0"
|
||||
parseInt (T.drop 1 "\0\&123") === Some 123
|
||||
T.splitOn "\0" "Hello\0World" === ["Hello","World"]
|
||||
|
||||
testCodePoints = scenario do
|
||||
T.toCodePoints "Hello" === [72, 101, 108, 108, 111]
|
||||
T.fromCodePoints [87, 111, 114, 108, 100] === "World"
|
||||
|
Loading…
Reference in New Issue
Block a user