Commit Graph

2112 Commits

Author SHA1 Message Date
Paul Brauner
55d1d9c07f
Make keys 2.dev-only (#18573)
* reject keys in the decoder for lf<2.dev

* fix ContractKeySpec

* fix the AnyContractKey.daml integration test

* fix the AnyEqOrd.daml integration test

* split the AuthFailure.daml integration test

* fix the BasicTests.daml integration test

* fix the ConsumedContractKey.daml integration test

* fix the ContractIdInContractKey.daml integration test

* fix the "*Key*.daml" integration tests

* split the ExceptionSemantics.daml integration test

* split the ExplicitDisclosure.daml integration tests

* fix the LfStableMustFailCommit.daml integration tests

* fix the LfStableMustFailInterpretation.daml integration tests

* split the SemanticsEvalOrder.daml integration tests

* use dev dars in EngineTest.scala for now

* use dev dars in NodeSeedsTest.scala for now

* fix tests extending AbstractScriptTest

* fix CodegenTest.scala

* fix ScriptService.hs

* fix Daml*ScriptTestRunner tests

* fix doc snippets tests

* fix codegen tests

* fix test-common:model-tests

* fix compile error

* fix //language-support/ts/codegen/tests:build-and-lint-test

* fix //ledger-service/lf-value-json:tests

* fix //daml-script/test:upgrade-test

* Apply

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

* Apply su

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

---------

Co-authored-by: Remy <remy.haemmerle@daml.com>
2024-03-05 16:23:11 +00:00
Remy
a5046e124b
Rename EBuiltin into EBuiltinFun (#18635) 2024-03-05 15:32:55 +01:00
Remy
c29cd07b18
[LF] Change Prim* to Builin* (#18608)
Co-authored-by: Paul Brauner <141240651+paulbrauner-da@users.noreply.github.com>
2024-03-05 07:55:51 +00:00
Remy
6e74d0d4bc
Add Generic Numeric rounding (#18613) 2024-03-04 17:38:41 +01:00
Remy
5df53ffa30
move BigNumeric type out of Prelude (#18614) 2024-03-04 12:07:26 +01:00
Remy
68dfd93476
Drop non interned string from archive proto (#18598) 2024-02-29 17:01:51 +00:00
dylant-da
b089e6daea
Typecheck variant upgrades (#18592) 2024-02-29 15:00:17 +00:00
dylant-da
a9d14fbb5e
Deeper type resolution via gammaTypes, more errors for datatypes (#18172) 2024-02-29 11:25:33 +00:00
Remy
9fd32b7b0c
[LF] Drop non interned DottedName from archive proto (#18578) 2024-02-28 18:11:55 +01:00
Moisés Ackerman
3e18bba30b
Fix bogus error when deriving Enum for single-constructor enumeration (#18513)
* Add failing test case

* Bump GHC_REV
2024-02-28 11:35:05 +00:00
Remy
fb7ed24b6e
[LF] drop KeyExpr from archive proto (#18583) 2024-02-28 00:19:31 +00:00
Remy
979bcd9eca
[LF] drop proto LF 1 archives (#18581) 2024-02-27 16:02:45 +01:00
Moisés Ackerman
3f365b1ca9
fix damlc integration jq queries (#18588)
* damlc-integration: don't decode package id in import/export jq queries

* damlc-integration: add '// 0' fallback for possibly empty proto fields
2024-02-27 14:15:47 +01:00
Remy
559e3fa47c
remove completly HasSubmit type class (#18563)
and add decprecation for Daml script submitWithOptions and
submitMustFailWithOptions introduce in #18562.
2024-02-23 19:13:17 +01:00
Paul Brauner
325950fdfb
add contract key feature to the compiler (#18527) 2024-02-20 11:53:52 +00:00
Remy
8512a63b05
[damlc] Resurrect scenarios (#18467)
It is mainly a revert of 384111d806 with
the following change Scneario are put in DA.Scenario module instead of
Prelude
2024-02-14 15:37:26 +01:00
Remy
1459f084c9
[LF] move BigNumeric to 2.dev (#18459)
* [LF] move BigNumeric to 2.dev

* fix

* fix integration test

* fix damlc test

* lsp-test

* fix round

* cosmetic

* typo

* cosmetic
2024-02-13 16:51:00 +00:00
dylant-da
74a9d98a1f
Support split release artifactory, improve missing connection errors (#18271)
* Add resolution via artifactory, handle HTTP errors

* Replace origin with wrapErr in resolveReleaseVersionUnsafe

* Handle broken connections (e.g. no internet)

* drop comment, fix foldMap id to fold

* remove debugging writeFile calls

run-all-tests: true

* Rename partial field damlPath to damlPathUnsafe and add safe function

* support multiple possible installation locations

* update alternatives

* Wrap CouldNotResolveReleaseVersion into AssistantError in unsafe resolve
2024-02-13 12:28:32 +00:00
Remy
efcdf6aab2
[LF] erase nat type (#18453) 2024-02-12 14:41:11 +00:00
Remy
71f0183b7a
[LF] Remove last remaining of Decimal (#18438) 2024-02-12 13:16:52 +00:00
Remy
2a7d9715ed
remove Legacy Numeric builtins for the compiler (#18447) 2024-02-12 12:14:29 +01:00
Paul Brauner
f42a6d526e
remove USoftFetch and USoftExercize in the compiler (#18440)
* Remove USoftFetch

* Remove USoftExercise
2024-02-12 10:43:47 +01:00
Paul Brauner
2046a3c89b
remove the featurePackageUpgrades flag from the compiler (#18424)
* remove the featurePackageUpgrades flag from the compiler

* fix //compiler/damlc/tests:platform-independence-dar-hash-file-matches

* fix Daml[23]ScriptTestRunner
2024-02-09 10:57:33 +01:00
Paul Brauner
6291abbe7a
Remove the V1 major language version from engine (#18400) 2024-02-08 16:09:47 +01:00
Moisés Ackerman
db14360701
Remove retroactive interface instance syntax (#18350)
* Bump GHC_REV

* Remove retroactive interface instances

* Remove more uses of retroactive ii

* Remove rii from //compiler/damlc/tests:daml-doc

* Remove rii from docs/source/daml/code-snippets-dev/Interfaces.daml

* Bump GHC_REV
2024-02-07 11:28:25 +00:00
Paul Brauner
35e255e6b0
Address LF2 TODOs in the daml repo (#18386)
run-all-tests: true
2024-02-06 10:45:28 +01:00
dylant-da
5527dda0e6
Participant Upload-Time Check for Upgrades (#18102)
* initial progress

* lint

* Implement typechecks for fields of datatypes

* lint

* check keys, refactor datatype origin check

* Rewrite test to check canton output

* Emit upgradeability errors in package service, test in UpgradesIT

* Refactor packageManagementClient Upgrades test for multiple dars

* lint

* check using upgraded pair, refactor upgrades

run-all-tests: true

* Re-enable warnings, fix up comments

* track ValidUpgrade

* Start writing variants for upgrade errors

* Move upgrades typechecking into validation, improve naming

* omit unnecessary curly braces

* lint

* Make TypecheckUpgrades fields private

* Rename stripPackageIds to unifyPackageIds, small syntactic fixes

* Fix dataTypeOrigin to not rebuild the ChoiceNameMap each time

* Improve logging, inline some declarations in for comprehensions

* revert `cantonFixtureDebugMode = true` to false

* Structure error messages in Upgrading

* Fix expected error messages

* Fix expected message for upgrade notification

* Port new checks from https://github.com/digital-asset/daml/pull/18172

* Fix bug that makes package resolution fail

* Implement rest of error messages, and expect them - some refactoring

run-all-tests: true

* Replace curly braces with `with` keyword in tests

* lint

* Move UpgradesIT to validation tests

* Turn adding a template key into an upgrade error

* Fix deps for upgrades integration test

* lint

run-all-tests: true

* Remove temporary files after reading log info

* Make UpgradeError extend ValidationError, use Unhandled for other errs

* Port DamlcUpgrades over to scala-side UpgradesSpec

* lint

* remove inplace files

* fix metadata flatMap, add back deps for other daml-lf validations tests

* Clarify "this package" to "upgrading package"

* update TODO comment to point to relevant PR (#18377)

* lint

* update expected messages for Missing{Module,Template,Choice,Datatype}

* Use 3-part enum for cantonFixtureDebugMode (debug or remove/keep files)

* apply Remy's recommended linting changes, reorg code slightly

* lint

* More refactoring, fix package service for changed error fields

* Reset canton/community codedrop, remove canton participant upgrade test

---------

Co-authored-by: Carl Pulley <carl.pulley@digitalasset.com>
2024-02-05 18:54:56 +00:00
Paul Brauner
163b370654
remove the sharedKeys feature flag in the engine (#18376)
* Default to always shared keys

* undo canton changes for now, introduce fields and overloads to maintain compatibility
2024-02-05 18:26:01 +00:00
Moisés Ackerman
1a09ad6895
Split {Has=>{Get,Set}}Field (#18319)
* Split class HasField into {Get,Set}Field

* Update golden files

* Bump GHC_REV

* Update golden files

* Fix {Has=>{Get,Set}}Field test in //compiler/lsp-tests:lsp-tests

* Fix //daml-script/test:test_test_suite_src_com_digitalasset_daml_lf_engine_script_test_Daml2ScriptTestRunner.scala

* Mention HasField split in UNRELEASED.md

* DataDependencies tests for custom {Get,Set}Field instances

* exclude {Get,Set}Field instances in daml-base docs

* Add {Has=>{Get,Set}}Field migration notes and example in UNRELEASED.md

* Bump GHC_REV
2024-02-02 11:55:50 +00:00
Paul Brauner
f7dfff8b49
make metadata non-optional in packages (#18363) 2024-02-02 11:16:03 +00:00
Remy
3b292d0032
[LF] drop retroactive interface instance (#18282) 2024-02-01 17:41:51 +01:00
Marton Nagy
6bcd4a8c10
[LF] Remove divulgence based disclosure (#18296)
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2024-02-01 14:42:12 +00:00
Paul Brauner
7e7534166a
make featureTemplateTypeRepToText dev-only (#18298)
* make featureTemplateTypeRepToText dev-only

* fix platform independence hash test

* add a TODO to improve error messages involving types
2024-01-30 11:37:00 +00:00
Paul Brauner
806ca2a1ba
remove unused script1DevDar in DamlcTest.hs (#18323) 2024-01-30 09:19:59 +00:00
mziolekda
90d90ea759
remove scala bindings and ledger-api-client (#18301)
* remove scala bindings from daml-script

* remove bindings-pekko

* clean test-common

* clean rx-java

* clean the rest

* remove ledger and scala-bindings

* format

* correcting from code-review
2024-01-29 17:28:14 +00:00
Paul Brauner
57d28c15fa
remove agreement text from the compiler (#18272)
* remove agreement text from the compiler

* update GHC_REV

run-all-tests: true

* point to the HEAD of master-8.8.1
2024-01-29 12:49:12 +00:00
mziolekda
779e84987a
use canton ledger-client (#18025)
* PoC to demonstrate the use of canton ledger-client

run-all-tests: true

* make it compile on canton-3

* remove all remnants of ledger-api-* from daml-script

* make the whole projet build

* Convert daml2-script and daml3-script to ledger-api-v2 (partially)

* Transfer some tests over to v2

* Update next batch of tests to api-v2

* Add temporary maven artifacts.

* Add maven tags to canton

* Format canton build file, rename coordinates

* Finally release passes

* Fix daml script following LedgerClient changes

run-all-tests: true

* Format canton/BUILD

* Update after merge, get all canton targets building

* Format canton/BUILD

* Fix further build issues

* Update ledgerclient to avoid GetLedgerEnd

* Update comment

---------

Co-authored-by: Samuel Williams <samuel.williams@digitalasset.com>
2024-01-26 16:14:39 +01:00
Samuel Williams
4e6778a54d
Restructure daml3-script such that everything is internal. (#18127)
* Restructure daml3-script such that everything is internal.
run-all-tests: true

* Fix remaining shake test
2024-01-26 14:03:30 +00:00
Moisés Ackerman
55e4e19cc2
Support dot syntax with user-defined HasField instances (#18287)
* Add failing test case

* Don't inline {get,set}Field when used with custom instances
2024-01-26 14:11:29 +01:00
Moisés Ackerman
4599ab433a
Remove support for 'template-let' syntax (#18262)
* Bump GHC_REV

* Remove template-let from daml-test-files

* Remove template-let from code-snippets

* Update golden file UnusedMatchTests.EXPECTED.desugared-daml

* Bump GHC_REV
2024-01-25 17:05:13 +01:00
Paul Brauner
9b46669aae
remove the nat type erasure feature flag in the compiler (#18261)
* remove the nat type erasure feature flag in the compiler

* update LegacyCppFlags.daml

* fix platform independence test
2024-01-25 10:42:26 +01:00
Paul Brauner
318e1d380e
remove the simple interfaces feature flag from the compiler (#18263)
* delete the featureSimpleInterfaces flag

* fix DamlcIntegration tests

* add DAML_INTERFACE to LegacyCppFlags.daml
2024-01-24 16:41:49 +00:00
Paul Brauner
384111d806
remove the scenario feature flag from the compiler (#18258)
* remove the scenario feature flag from the compiler

* fix platform-independence-dar-hash-file-matches
2024-01-24 13:33:18 +01:00
Paul Brauner
52afb3aba5
remove the right-to-left eval feature from the compiler (#18257) 2024-01-24 10:18:18 +00:00
Paul Brauner
5d9876983e
remove the nat synonyms feature flag from the compiler (#18246)
* remove the nat synonyms feature from the compiler

* Add cpp flags that are always set no matter what

* Add a test that DAML_NAT_SYN is always defined

* Apply suggestion

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>

* move the hpp-copy resource from integration-lib to integration-*

* fix LegacyCppFlags.daml

---------

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2024-01-23 16:11:10 +00:00
Paul Brauner
827578df04
remove the type interning feature from the compiler (#18244) 2024-01-23 13:32:54 +00:00
Paul Brauner
9ba485aa84
remove the stringInterning feature from the compiler (#18241)
* remove the stringInterning feature from the compiler

* add a TODO to remove constructors_str in the lf2 definition
2024-01-23 10:52:42 +00:00
Hubert Slojewski
3b5dce66f5
#15209 Remove agreement text part 1 (internal changes only) (#18218) 2024-01-22 17:06:17 +00:00
Paul Brauner
d7c8e125c6
Make package metadata mandatory in the compiler (#18235)
* Make package metadata mandatory in the compiler

* remove metatada from worldSelf

* simplify mergePkgs
2024-01-22 14:20:03 +00:00
Moisés Ackerman
b5fbcf8e3a
Split DA.Test.Sandbox off //libs-haskell/test-utils into //libs-haskell/canton-test-utils (#18210) 2024-01-22 14:53:35 +01:00