Commit Graph

49 Commits

Author SHA1 Message Date
Remy
90c908463f
[Engine] factorize a big ast iterable (#19369) 2024-06-21 10:20:44 +02:00
mziolekda
f60b1945e1
Split off value.proto into own lib (#19279)
* Split off value.proto into own lib

* Move the files to daml-lf

* Add artifacts

* Fix the build

* Rationalize bazel struct

* Fixes from review:
- improve handling of proto dependencies
- fix copyright note
2024-06-20 14:51:55 +02:00
Simon Maxen
19d2d6b17e
Remove unused GlobalKey.packageId accessor (#19400) 2024-06-20 09:11:27 +00:00
Simon Maxen
a757bd3be7
Update scalacoc for Transaction.Metadata (#19298)
* Update scalacoc for Transaction.Metadata

* Update with review comments

* Update GenPackage scaladoc
2024-06-14 14:07:29 +01:00
Remy
dcd1714d33
check LF version do not decrease with upgrade (#19168) 2024-06-12 15:57:16 +02:00
Remy
cf927ae30f
[LF-Parser] populate properly package dependencies (#19350) 2024-06-10 17:48:58 +02:00
Carl Pulley
ea815a8f9f
make Timestamp parsing consistent across Java versions (#19244) 2024-05-30 09:40:10 +01:00
Paul Brauner
3a68da1863
re-enable temporarily disabled tests (#19303) 2024-05-30 08:29:14 +00:00
azure-pipelines[bot]
5e7a52378c
update canton to 20240527.13372.v40019d14 (#19277)
* update canton to 20240527.13372.v40019d14

tell-slack: canton

* sync to canton @ 6da046644316b095ba529e9064c9e4bc9ed4d7e0

* fix //canton:community_domain

* fix more import issues

* Disable tests for "Skipping upgrade validation" msg until canton#19354

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Paul Brauner <paul.brauner@digitalasset.com>
Co-authored-by: Dylan Thinnes <dylan.thinnes@digitalasset.com>
2024-05-28 18:32:35 +02:00
dylant-da
c3a761838d
Apply Paul's suggested changes (bd55261a06) for Upgrading.scala (#19285) 2024-05-28 14:33:46 +00:00
dylant-da
004e6d3f1d
Upgrade validation compare deps pt1 (#19274)
* minimal initial changes from upgrade-validation-compare-deps

* Add stub function for part 1 compilation
2024-05-28 13:00:22 +01:00
Remy
a0d93a12df
Fix packageVersion in TestNodeBuilder (#19264) 2024-05-27 09:28:08 +02:00
dylant-da
935c3fb10e
Expand upgrade validation testing (#19123)
* Remove duplication from tests

* lint

* lint

* Simplify tests

* lint

* add more tests for dependency behaviour

* track new test files

* lint

* add test for failure being only emitted in the module that originates it

* fix stdout capture for rules_daml

* lint

* lint

* Move CannotUpgradeView into own section

* Fix more upgrades gen
2024-05-23 09:36:05 +01:00
Remy
b06a9e836e
[LF] add packageVersion to Create Node, and Contract Instance (#19243) 2024-05-22 15:40:13 +02:00
azure-pipelines[bot]
1064fff281
update canton to 20240516.13312.vd8490aac (#19227)
Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Marcin Ziolek <marcin.ziolek@digitalasset.com>
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2024-05-17 11:22:43 +00:00
Remy
18c9dce941
[Speedy] recompute contract metadata when using different pkg versions (#19206)
This is the last piece to fix #19161

Co-authored-by: Paul Brauner <141240651+paulbrauner-da@users.noreply.github.com>
2024-05-16 07:16:16 +00:00
Remy
0b0f842d47
split //daml-lf/valiation/upgrade-tests (#19208)
this should reduce flakyness and running time
2024-05-15 13:39:24 +00:00
Simon Maxen
317b6b2057
Clarification of what packages are needed in engine re-interpretation (#19197) 2024-05-15 14:10:00 +01:00
Remy
82f1285a93
[Speedy] drop FetchAny (#19200) 2024-05-15 09:55:00 +02:00
Remy
c1ced1fb8b
[Speedy] remove some useless optTargetTemplateId (#19196) 2024-05-14 17:07:06 +02:00
Remy
d80bd95cd6
[Engine] lookup for disclosed contracts after looking in the cache. (#19185)
This is a cosmetic change to clarify search strategy (local -> disclosed -> other).
Since local and disclosed contract does not have same format of contract ID (the later is suffixed while the former is not), it should not change the behavior.
2024-05-14 10:00:35 +02:00
tudor-da
2e2bf73ab3
Publish //daml-lf/archive/encoder:encoder artifact (#19166) 2024-05-08 16:54:05 +02:00
Ratko Veprek
02fff5d5c2
Revert "Add location to engine logger (#19104)" (#19150)
This reverts commit ce507d9959.

Reverting as the location is always the internal prelude function. So it's not really useful.
2024-05-03 12:01:00 +02:00
Remy
c59b45c860
Fix LF-encoder so it read metadata (#19141)
forward port of #19140
2024-05-02 12:08:54 +00:00
Simon Maxen
283e801c8f
Sync package name and directory (#19129)
* Add scala subdirectory for consistency

* Move files to match package
2024-05-02 09:27:19 +01:00
Simon Maxen
b4009e3c1e
Remove unused duplicate error infrastructure (#19121)
* Remove unused duplicate error infrastructure

* Remove trailing deps
2024-04-30 17:07:24 +01:00
dylant-da
b3fa897dc1
Validate Interface Upgrades (#19054)
* Initial attempt/PoC at pulling out interfaces and typechecking them

* Add checking for new interfaces

* Fix call to checkUpgrade, improve/fix warning for locally defined iface

* drop todo

* clean up noop checkDeletedIfaces

* Check that an instance is not deleted

* Port checks to Upgrading.scala, port tests to UpgradesSpec.scala

* Improve context reporting in upgrade validation

* Add tests for dropped/added interface instances

* Fix regices for failure

* lint

* fix copyright headers

* Re-enable flaky, fix formatting issues

* More tests + checks for ifaces in same package as template/instance

* fix expectation on "Cannot upgrade view" for Windows UTF-8/16

* Synchronize tests from DamlcUpgrades to UpgradesSpec

* lint

* Add module name to "DefineIfacesAndTemplates" error, fix test

* re-enable tests

* lint
2024-04-29 19:56:03 +00:00
azure-pipelines[bot]
71cea0bd86
update canton to 20240426.13186.vafd3a931 (#19106)
* update canton to 20240426.13186.vafd3a931

tell-slack: canton

* Fix Tls dependencies

* Expect updated format for upgrade error message from canton #18816

* Fix release artifacts

* add maven coordinates to tls

* hopefully the final fix of the tls project

* disable test on Arm Linux

* lint

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Marcin Ziolek <marcin.ziolek@digitalasset.com>
Co-authored-by: Dylan Thinnes <dylan.thinnes@digitalasset.com>
2024-04-29 17:56:28 +02:00
Ratko Veprek
ce507d9959
Add location to engine logger (#19104)
Before this change, we were not able to filter the engine logging by location. Now, we do.
2024-04-27 18:52:20 +02:00
dylant-da
d48c75d019
Upgrade validation dry run only (#18660)
* Add flag for disabling upgrade validation, refactor tests

* mark upgrade-tests flaky

* remove unused disableUpgradeValidation method

* update canton to 3.0.0-snapshot.100000000.20240305.12764.0.v09f6d95a

tell-slack: canton

* Adapt code after renaming v1 to v2

Adapts daml because of https://github.com/DACH-NY/canton/pull/175211

run-all-tests: true

* Quick-fix build by adding missing `recordTime` parameter to the `TransactionGenerator`

This change affects tests only. However, this is a quick-fix, and there should
be a proper follow-up.

* Disable "hot reload" test since it breaks on Carl's changes

In a week we should fix this once https://github.com/DACH-NY/canton/pull/17652 is merged

* Fix expected protobuf structure in test-protobuf-structure.sh

* Compare transactions without record time in UpdateClientImplTest

* lint

* Revert changes to canton since origin/main

* Add dry run property to upload requests

* test dry run upload failure

* lint

* fix tests

* Describe dry run flag in Help.Description

* rename field in PackageServiceErrors

* Fix expected message

* Move dry run check outside validation

* Remove changes to canton

* drop dry-run flag from upload request (for now)

* drop other uses of dryRun

* lint

* copy canton

* Revert "drop other uses of dryRun"

This reverts commit cf6b9b2bfc.

* Revert "drop dry-run flag from upload request (for now)"

This reverts commit ce8aaecaf3.

* Use updated dryRun interface

* update canton to dry-run

* reset canton

* re-enable flakiness

* drop dryRun from TestingAdminLedgerClient

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Co-authored-by: Yves Geissbuehler <yves.geissbuehler@digitalasset.com>
2024-04-26 10:14:49 +01:00
azure-pipelines[bot]
612c9bdd74
update canton to 20240419.13141.v8e75f5c1 (#19057)
* update canton to 20240419.13141.v8e75f5c1

tell-slack: canton

* fix the compilation of community_ledger_ledger-json-api

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Paul Brauner <paul.brauner@digitalasset.com>
2024-04-23 13:43:11 +00:00
Ratko Veprek
f57a8c9f4c
Allow injecting custom logger into engine (#19051)
Before this change, we couldn't inject a custom logger into the engine. As such, debug output of commands would not be associated to the Canton trace-id, making the feature not very useful. Now, the API is extended such that the custom logger can be easily added.
2024-04-19 16:04:23 +00:00
Artúr Poór
280f0b5a44
Fix typo in Timestamp LF conversion error message (#18995) 2024-04-19 14:11:41 +02:00
Simon Maxen
05212c9fd4
Cleanup GlobalKey use (#19027)
* Cleanup GlobalKey use

* With canton one line fix

* Update with review comments

* Add packageName to GlobalKey.toString
2024-04-18 15:00:52 +01:00
dylant-da
4f422ab27c
Fix v1 2 3 upgrade tests (#18997)
* Fix tests involving subsequent uploads

* lint

* Address Carl's comments

* lint
2024-04-16 18:47:26 +01:00
tudor-da
cf0579f614
More useful PackageInfo definition (#18998)
* More useful PackageInfo def

* Simplified
2024-04-16 15:00:48 +00:00
Remy
54cfdfb5de
[Engine] Simplify Compiled packages (#19007) 2024-04-16 16:06:42 +02:00
tudor-da
91c1c12ded
Improve PackageInfo definition (#18980)
* Improve PackageInfo definition

* Fix PackageInfoSpec

* Apply suggestions from code review

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Format

* Another small fix

---------

Co-authored-by: Remy <remy.haemmerle@daml.com>
2024-04-12 18:20:04 +02:00
Remy
9c3ceab776
Test for LF V1 Archive Reader (#18946)
* Test for LF V1 Archive Reader

* Update sdk/daml-lf/api-type-signature/src/test/scala/lf/typesig/reader/SignatureReaderSpec.scala
2024-04-08 11:00:42 +02:00
Simon Maxen
6eb409f898
Pass package-name into GlobalKey construction (#18927)
* Pass package-name into GlboalKey construction
2024-04-08 09:36:38 +01:00
Remy
c31940581e
Decode package type signature for LF1 (#18940)
We pick the proto for LF1 and the Decoder from main-2.x
We drop withing the decoder the expression decoding and and fill the AST with EUnit where an expression is needed.

Test will be done in a subsequent PR.
2024-04-05 09:27:47 +02:00
Paul Brauner
cf2b387c3b
Disallow keys in LF 2.1 in the compiler (#18886)
* Disable keys in LfConversion.

* fix UnusedMatchTests.daml in integration-v21

* fix //compiler/damlc/tests:upgrades

* stop compiling daml tests that use keys with 2.1

* migrate the upgrade examples to 2.dev as they use keys

* only compile daml-script/tests dar using keys to 2.dev

* do not compile daml-script/test daml files that use keys to 2.1

* fix //docs:bindings-java-daml-test

* add TODOs everywhere tests need to be split

* add a tests that checks that contract keys are rejected for LF<2.dev

* remove keys from compatibility tests

* Add the qualified template name to the keys not supported error message
2024-04-03 16:24:22 +02:00
Remy
edb0a4effd
extract archive reader trampoline in its own file (#18921) 2024-04-02 18:50:25 +02:00
Simon Maxen
aef62dc3b6
Include package-name in global key (#18835) 2024-04-02 13:13:39 +01:00
Remy
e378a0f221
partial revert of [LF] drop retroactive interface instance #18282 (#18876)
* refactor bazel LF versions

* partial revert of [LF] drop retroactive interface instance #18282

recover retroacive instance in
- AST
- api-type-signature

* fmt

* Apply suggestions from code review

Co-authored-by: Paul Brauner <141240651+paulbrauner-da@users.noreply.github.com>

* address Paul's review

---------

Co-authored-by: Paul Brauner <141240651+paulbrauner-da@users.noreply.github.com>
2024-04-02 10:11:36 +00:00
Remy
24a9e9f99f
Recreate LF major version 1 (#18833) 2024-03-26 09:06:35 +01:00
Remy
d786b53522
Revert "remove support of retroactie interface instance in api-type-s… (#18856)
* Revert "remove support of retroactie interface instance in api-type-signature (#18382)"
2024-03-25 16:21:05 +00:00
Simon Maxen
6e5763b40f
Port upgrading changes from 2.x (#18733)
Includes:
Pass package resolution into reinterpret (#18286)
Enable upgrading based on language version (#18239)
2024-03-22 12:12:15 +00:00
Gary Verhaegen
e40aad897f
move to subdir 3.0 (#18520)
* move most files

* update CI configuration
2024-03-22 02:27:46 +01:00