Commit Graph

1915 Commits

Author SHA1 Message Date
nickchapman-da
629439d876
[engine] choice authority syntax (#16602) 2023-03-29 15:19:47 +02:00
Samuel Williams
67f87ad75f
Convert LSP tests (#16615)
* Convert lsp tests to scripts

* Tests are still flaky
2023-03-29 11:41:29 +01:00
Samuel Williams
04e28f6e21
Use unversioned daml-script where possible (#16609) 2023-03-29 11:39:50 +01:00
Samuel Williams
9aa586fb9e
Switch doctest to use scripts (#16573)
* Convert doctest over to using script.
Prim tests not working

* Add no-source flag to doctest so we can still run stdlib

* Fix damlDocTestntegration

* Add various comments, fix up flags
2023-03-27 16:18:41 +01:00
Samuel Williams
7965687da2
Convert ShakeIdeClient tests from Scenario to Script (#16587)
* Convert ShakeIdeClient tests from Scenario to Script

* Small tweaks
2023-03-27 14:28:20 +01:00
Samuel Williams
512cf5c769
Remove scenarios (or mention of) from a small batch of tests (#16575)
* Remove scenarios (or mention of) from a small batch of tests

* Small fix
2023-03-21 14:51:59 +00:00
Samuel Williams
4df21fe69a
Drop scenarios from incremental and data deps tests (#16559)
* Remove Scenarios from Incremental builds

* Remove scenarios from Data deps

* Fix IncrementalBuilds for different release version

* Drop warning flag

* Small fixes

* Small refactor
2023-03-17 12:58:22 +00:00
Samuel Williams
ddc27715ab
Scenario service error reporting fix (#16503)
* Return error through grpc with print in unexpected cases
Fix a couple error cases

* Fix spacing test

* Refactor HashingError to have explicit case
2023-03-16 14:42:39 +00:00
Remy
b26484da11
[Disclosures] Validate hash of disclosed contracts (#16470) 2023-03-16 10:19:54 +00:00
Samuel Williams
8e869a4809
Omit versions for daml-script/daml-triggers in EXPECTED.json files (#16549)
* Omit versions for daml-script/daml-triggers in EXPECTED.json files

* Rename replacer
2023-03-15 16:55:31 +00:00
Moisés Ackerman
98dd1a3045
Add dynamicExercise expression and builtin (#16431)
* Add dynamicExercise expression and builtin

* Add DAML_DYNAMIC_EXERCISE feature flag
2023-03-15 10:35:24 +01:00
Moisés Ackerman
3ce15c6094
daml damlc init reads build-options from daml.yaml (#16492)
* Extract cmdUseDamlYamlArgs

* Use cliArgsFromDamlYaml only for cmdUseDamlYamlArgs

* Add Init to cmdUseDamlYamlArgs

* Add DocTest and Lint to cmdUseDamlYamlArgs

* Drop unused CommandName constructors

* cmdUseDamlYamlArgs is now a function
2023-03-14 10:44:36 +01:00
Samuel Williams
bbc45727dc
Use jq -n everywhere (#16514) 2023-03-10 13:44:46 +00:00
Samuel Williams
1b5778ea53
Remove broken test file (#16517) 2023-03-10 14:03:55 +01:00
Samuel Williams
eb8bd8a753
Main batch of test changes (#16333)
* WIP Implement integration script test support

* Add ghc_pkg

* Get scripts to run in integration tests!
Add expected error to new test

* Slight refactor

* First batch of test changes

* Update a few more tests

* Automated: Add imports, rename script and party

* Add Cmd postfixes

* Further changes including archiveCmd, error/warning locations, test specific behaviour

* Convert next batch of tests over

* More test updates

* All integration tests passing

* Update desugar files

* Handle some TODOs

* Bring back script integration, this time tested for different SDK versions

* Small fixes

* Revert broken test to scenario

* Create failing test that covers behaviour

* Add Daml.Script to daml-docs tests

* Shift dependency installation to start of suite for performance

* Only pipe scriptPackageData to golden tests

* Update daml doc expected files

* Update ContractKeyNotEffective to do fetch in contract

* Minor fixes

* Fix 1.15 test

* Test modifications from comments

* Update desugar files

* Fix Examples file for determinism and memory-examples tests

* Final test tweaks

* Drop old TODO

* Fix list test not running

* Update desugar
2023-03-09 16:00:24 +00:00
Samuel Williams
95dda28129
Add warning for top level test-like definitions (#16438)
* Add warning for top level test-like definitions

* Missing commas

* Generalise script package check to be unversioned

* Add a note to release file
2023-03-09 10:09:40 +00:00
Samuel Williams
8e90882105
Add errors for self, this, and arg. Add many tests (#16459)
* Add errors for self, this, and arg. Add many tests

* All WarnUnsupportDamlNames flag, warn for non breaking names, update tests

* Rename flag, update test

* Update to merged ghc version, changelog
2023-03-09 09:14:39 +00:00
Moisés Ackerman
3ec0f53850
Renamer golden test ignores GHC uniques (#16487) 2023-03-08 10:45:57 +00:00
Samuel Williams
81b90cf57c
Add daml-doc --doc-ext (#16475)
* Fix daml-doc md links

* Update ext in hoogle db

* Missing argument

* Move behaviour behind --doc-ext flag. Add warning
2023-03-08 09:39:14 +00:00
Samuel Williams
11c11d024a
Bump integration tests timeout to 3s (#16460)
* Bump integration tests timeout to 3s

* Update loop errors
2023-03-07 09:27:12 +00:00
Samuel Williams
8f50d205c3
Add jq stream support to integration tests. (#16451)
Fix bond-trading test queries
2023-03-03 17:18:43 +00:00
Samuel Williams
60e286eb69
Pre-error on jq for errors in integration tests (#16444)
* Pre-error on jq for errors in integration tests

* Fix tests without lf queries failing

* Refactor to make `mainProj` the source of json path
2023-03-03 15:01:30 +00:00
Samuel Williams
4503f7b638
Update bond trading tests (#16442)
* Update bond trading tests

* Formatting

* Disable scenarios in bond trading memory test
2023-03-02 16:00:29 +00:00
Samuel Williams
e16055d876
Fix controller unused arg warning for interface archives (#16430)
* Fix controller unused arg warning for interface archives

* Run tests:daml-desugar --accept
2023-03-02 13:56:37 +00:00
nickchapman-da
af9f30d5fc
damlc, Simplifier: case for BEWithAuthority (#16433) 2023-03-01 16:08:25 +00:00
dylant-da
6771135dd7
Automatically run scenarios in Studio with "Autorun All Tests" setting for Daml Extension (#16398)
* Add `daml ide` flag --studio-auto-run-all-scenarios to automatically run scenarios in studio

* Control via dedicated Daml extension settings attribute, `Autorun All Tests`
2023-03-01 09:38:01 +00:00
Moisés Ackerman
3cf2b8eee0
Check stderr in damlc-test external calls, so it's available upon failure (#16418) 2023-03-01 10:10:00 +01:00
Moisés Ackerman
fa22f85b16
Renamer golden test now extracts output from dump file instead of stderr (#16379) 2023-02-28 16:19:19 +01:00
Samuel Williams
ab3ed9c935
Support importing Script.Daml to determinism & memory test file (#16392)
* Support importing Script.Daml to determinism test file

* Install daml-script in memory tests
2023-02-28 08:19:52 +00:00
nickchapman-da
fd75c5ece1
[engine] construct ResultNeedAuthority (#16390) 2023-02-27 15:13:30 +00:00
Samuel Williams
f52cd077d6
Remove breaking expected file (#16389) 2023-02-27 14:00:04 +01:00
dylant-da
014b0ccc36
Fix formatting of GHC type errors (#16368)
* Point to updated revision

* Fix test failures due to expectations for unformatted errors

* Fix pretty printer for EForbiddenNameCollision, amend test
2023-02-23 20:18:18 +00:00
Samuel Williams
370a468524
Add Daml.Script to daml-docs tests (#16366)
* Bring back script integration, this time tested for different SDK versions

* Create failing test that covers behaviour

* Add Daml.Script to daml-docs tests

* Shift dependency installation to start of suite for performance

* Only pipe scriptPackageData to golden tests
2023-02-23 11:51:34 +00:00
Samuel Williams
d6bc75fcc0
Bring back script integration, this time tested for different SDK versions (#16361) 2023-02-23 09:20:12 +00:00
dylant-da
adb01a7b68
Table and transaction view in daml test (#16353)
* Initial outputTables work

* refactor outputTables

* Fix duplicate ShowCoverage opt

* Export TableOutputPath & TransactionsOutputPath constructors

* Implement outputTransactions

* Fix redundant imports, unused fields

* Embed extension's CSS style into generated tables / traces

* lint

* Extract webview css without locateResource

* Check stylesheet exists before reading it, emit warning if necessary

* Refactor tryWithPath
2023-02-22 17:56:50 +00:00
Samuel Williams
1d8c361dc1
Revert integration test support until fixed (#16360)
* Revert integration test support until fixed

* Remove some missing changes
2023-02-21 14:19:37 +00:00
dylant-da
a90865d370
Show time elapsed on running scenarios in IDE (#16324)
* PoC: Add live script runner with intermediate live messages

* Unify live and non-live scenario service script runners

* Add live scenarios

* Clean up runLiveScenario

* dedupe runLiveScenario/runLiveScript

* return to onComplete mode

* Send status update every second

* Send progress events with milliseconds passed instead

* Fix runLiveScript -> runLiveScenario

* Show milliseconds passed in scenarios

* Sleep a random amount 300;600 ms

* Try to prevent older status updates from overwriting newer ones

* lint

* wrap errors appropriately

* Remove wrong secondary webview update

* Define variants inside companion object

* use abstract class instead of trait

* lint
2023-02-20 17:19:42 +00:00
Moisés Ackerman
dd9c07177f
Timeouts are now reported correctly for daml-script Scripts (#16344)
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2023-02-20 11:03:21 +01:00
Remy
12c240e06e
[Speedy] do not need disclosed contract at Machine creation time (#16302)
This PR make several (small) changes on how the disclosed contract are
handle by the speedy machine.

(1) disclosed contract at not anymore pass a builtin time. They were
any pass latter using `SBCacheDisclosedContract`.

(2) disclosed contracts are first keep in their own cache,
disclosedContracts: Map[V.ContractId, CachedContract]. They are moved
to the cached for used contract only if used.  In fact we need to be
sure the used disclosed contracts pass through the
Speedy#addGlobalContract to verify the transaction limits are not
overpassed.
2023-02-17 22:59:41 +00:00
Samuel Williams
d3feb57b39
Support Script tests in integration suite (#16323)
* WIP Implement integration script test support

* Add ghc_pkg

* Get scripts to run in integration tests!
Add expected error to new test

* Slight refactor
2023-02-17 11:21:29 +00:00
Samuel Williams
fb55f4c1bb
Add signatory labels to create and fetch in tree view (#16291)
* Add signatory labels to create and fetch in tree view

* Switch node printing in scala and expected ledger files

* Update docs/images

* Update party formatting to use `x, y and z` and correct verb tense

* Update scala to match haskell, update tests and docs (except images)

* Cleanup code from suggestions

* Fix misformatting, refactor
2023-02-16 15:57:01 +00:00
Samuel Williams
0516143831
Fix warning about unused this in exception messages (#16313)
* Fix warning about unused `this` in exception messages

* Fix desugar tests

* Update ghc version

* Update test to include context
2023-02-16 15:32:30 +00:00
mziolekda
1a3980bf89
Separate test-common from the rest of the ledger code (#16307)
* move files

* format

* wrong file

* fix conformance tests

* add readme

* fix compatibility tests

* fix haskell tests
2023-02-14 15:29:13 +00:00
Samuel Williams
0c9ba9e691
Allow name shadowing in choices (#16306)
* Add bypassReduceLambda to allow shadowing

* Fix integration test

* Update ghc, update desugared cases

* Update ghc version
2023-02-14 11:39:42 +00:00
Samuel Williams
5c00481ae0
Source location plumbing (#16269)
* Update protobuf to include sourceloc for implements and coimplements
Relevant haskell changes

* Update error ranges in tests

* Extract source locations from various template/interface parts

* Improve ExprSource extraction

* Move location from instance head to template/interface parts
Add location to instance print
2023-02-10 16:26:34 +00:00
Samuel Williams
9fdeaf2ed4
Fix list pattern match warnings to use :: (#16278)
* Fix list pattern match warnings to use ::

* Add test case

* Update ghc version
2023-02-10 16:24:46 +00:00
Remy
a75db47275
[LF] factorize GlobalKeyWithMaintainers and KeyWithMaintainers (#16251) 2023-02-08 13:58:43 +01:00
Samuel Williams
90a0f13829
Implement name synonyms in error prints (#16242)
* Implement interface name synonyms in error prints
* Add View type synonym test
2023-02-08 10:33:57 +00:00
Remy
2851401df6
[ScenarioService] add evaluation timeout (#16204)
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2023-02-06 08:59:12 +01:00
Remy
aad8725ea7
[damlc] change default output to 1.15 (#16157) 2023-02-06 08:58:47 +01:00