* Amend DA.Numeric & Prelude to use updated primitives, make Legacy module
* Replace legacy numeric functions with CPP
* starting fixes - WIP
* remove clauses from convertPrim
* fix integration tests using Pi with new parameter
* Split tests into pre-post DAML_NAT_TYPE_ERASURE
* reorder forall-quantified vars in numeric primitives
* Refactor PackageMetadata construction
* Package Metadata now can include an upgraded package id
* define PackageInterface#lookupPredecessors
* Add SoftFetch in Daml LF
* Add softFetch function in Daml
* Add USoftFetch LFConversion primitive
* Define SoftFetch in terms of SBPromoteAnyContract
* daml_compile rule now takes upgrades arg
* Add script test for softFetch
* TODOs
* Check LF >= 1.dev when decoding 'upgradedPackageId' and 'softFetch' in DecodeV1.scala
* Check that softFetch is not called on templates with contract keys
* Seq=>List
* ModParser todo
* Extract PackageUpgradesIT from AbstractFuncIT
* Update docstring for SBPromoteAnyContract
* Fix build errors
* Fix build error
* DecodeV1Spec case for softFetch
* DecodeV1Spec case for upgradedPackageId
* EncodeV1 case for upgradedPackageId
* Fix build error
* Disable test due to cyclic dependency with canton
* Add transitive case to PackageUpgradesIT
* Clean up PackageUpgradesIT
* Fix build error
* Error if 'upgrades' field is present before featurePackageUpgrades
* Update doc on compileSoftFetchTemplate
* Reword WronglyTypedContractSoft error
* Begin work on cancellable scenarios
* Stubs that pass typechecking, for bidirectional streams
* Place default value in running handlers
* Support start/stop requests
* switch script to scenario
* ScenarioServiceMain lint
* Fix nonexhaustive check
* Working but ugly
* Remove ugliness / print debugging
* lint
* Distinguish cancellation by timeout vs request, refactor ior
* lint
* Implement automatic cancellation of outdated scripts, and test
* lint
* Fix boolean blindness in script cancellation signal
* Add timeout & steps to script interrupt test case
* Add test case for hover resetting script progress
* Remove unused ReplacedByOtherThread datatype
* remove dead debugging print statements
* Improve semaphore code
* Turn handler structure into a Semigroup, handle multiple response error
* Immediate actions from meeting
* Convert last files, include note about odd behaviour
* Fix loop error locations
* Drop party test tags, test fetch/lookup over script
* Change abort style, comment fixes
* Push choice authority through speedy evaluation
fix tests for choice-authorizers limits config
make calls to NeedAuthority as required from speedy begin-exerise builtin; and test
prepare for no authorizers check
* authorization check for NoAuthorizers
* Implement FreePort for Linux
* Refactor FreePort a little, add withCantonSandbox, convert tests
* Implement dynamic port range for windows
* Import readProcess
* Log macOS info
* Switch to locateRunfiles
* Add sysctl for macos
* Bracket correctly
* Change dir to mainworkspace
* Implement MacOS dynamic port range
* Improve regex matches
* Consider and address all 1.dev version markers. Some stay at 1.dev. Some change to 1.15 or earlier.
* TYPEREP_TYCON_NAME stays at 1.dev
* remove stray "x"s in .rst file
* 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
* Remove Scenarios from Incremental builds
* Remove scenarios from Data deps
* Fix IncrementalBuilds for different release version
* Drop warning flag
* Small fixes
* Small refactor
* 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
* 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
* 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
* 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`
* Point to updated revision
* Fix test failures due to expectations for unformatted errors
* Fix pretty printer for EForbiddenNameCollision, amend test
* 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
* 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
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.
* WIP Implement integration script test support
* Add ghc_pkg
* Get scripts to run in integration tests!
Add expected error to new test
* Slight refactor
* 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
* 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
* Add rules for running single scenarios, redefine RunScenario using them
* Turn runScenario into an action, not IO
* Add FormattingStarted custom message type
* Redefine OfInterest rule in terms of RunSingleScript
* lint
* fix broken renamed var
* Use getFilesOfInterest for diagnostics & uncompilable check
* explicitly run tests that need to be run
* Amend test
* Remove commented out code
* Remove vr formatting message
* Remove "Module" from daml-doc H1 headers
CHANGELOG_BEING
- Remove the word "Module" from the H1 page header of
- module pages and stop overriding the ToC headers to make
- the generated pages easier to use.
CHANGELOG_END
* Reinstate links in daml-docs rst TOC
* Update render tests
* Update golden tests
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* point to updated ghc
* point to updated GHC
* point to updated GHCIDE
* point to updated ghc
* Make _requires_ non-writable by inserting dollar - amend detectors
* Make _choice_ declarations non-writable (add dollar)
* Add checks for dollar-gen'd code require/view/interface_instance/method
* point to updated GHC
* point to updated ghc
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* point to updated GHC
* Point to updated ghcide
* update desugar tests
* point to revised daml-ghcide
* point to updated ghc
* point to updated ghc
* replace with isDamlGenerated
* point to merged ghc and merged ghcide
* Accept uppercase English alphabet letters in user IDs
changelog_begin
Accept uppercase English alphabet letters in user IDs
changelog_end
* Fix title case in docs change
Co-authored-by: Sergey Kisel <98825453+skisel-da@users.noreply.github.com>
Co-authored-by: Sergey Kisel <98825453+skisel-da@users.noreply.github.com>
* Move datatype DA.Action.State.State into a stable package
* Move datatype DA.Stack.SrcLoc into a stable package
* Move datatype DA.Random.Minstd into a stable package
* Skip doctest for DA.Action.State.Type
* Don't use magic numbers in CodeGenRunnerTests.scala
* Update comment in StablePackageTest.scala
* Use default anchors for daml-prim and daml-stdlib when building docs
This PR introduces two flags for subcommand 'daml docs':
* '--default-input-anchor' to use the default anchors defined by //compiler/damlc:daml-base-anchors.json. This is the default if neither '--input-anchor=PATH' nor '--no-input-anchor' are passed.
* '--no-input-anchor' to use an empty anchor map. This is used to build //compiler/damlc:daml-base-anchors.json, since it cannot depend on itself.
* break cyclic dependency
* Add custom viewtype mismatch error
* Modify error message on EViewTypeMismatch to be like GHC error
* Make EUnknownMethodInInterfaceInstance error consistent w/ GHC
* Add MethodTypeMismatch error, sync with GHC error
* Prefix fields in new errors
* Intercept type mismatch in method to throw EMethodTypeMismatch
* Synchronize EUnknownField with GHC-side message
* Complete synchronizing EUnknownField with GHC-side error message
* satisfy lint and changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* lint
* Fix TypingSpec for new EMethodTypeMismatch
* lint
* lint again
* EFieldTypeMismatch error for ERecUpd/ERecProj mismatch, like in GHC
* lint
Partly because the current version is from February (of this year,
fortunately), and partly because I need a more recent one to bump node
to 18 and fix the GSG for that.
* point to GHC with improved error
* Point to new GHC
* Fix error in RelTimeDetailsHidden1
* Point to updated ghc
* Point to new GHC
* Satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Fix assertion in RelTimeDetailsHidden1
* Amend tests with out-of-bounds NumericScale, point to updated GHC
* Drop quotes around type error
* Add tests for field access errors
* point to merged GHC
* point to updated GHC
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Point to updated GHC
* Expect new interface view error message in ImplementsNonInterface
* Add test for trying to implement a non-interface
* Point to GHC with better error suppression, fix tests
* Remove unused TryImplementNonInterface
* point to rebased ghc
* point to forwarded GHC changes
* point to updated GHC
* Fix expected error in ImplementsNonInterface
* Point to merged commit
* Prevent unused import warnings
* Remove all explicit occurences of GHC.Tuple.Check
* Update desugar tests
* Remove magic from GHC.Tuple.Check
* Add GHC.Tuple.Check back to DarReaderTest
* Point to merged changes
* Create tuple size check function in GHC.Tuple.Check
* Update desugar test
* lint
* Fix accidental minus in stable-packages
* Replace GHC.Types with GHC.Tuple.Check in doctest generation
* Fix DarReaderTest
* Fix DamlDocTest for GHC.Tuple.Check import
* Remove unnecessary DamlSyntax pragma
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Point to merged GHC changes
* Point to akrmn's merged in changes
* Point back at merged in changes
* restart CI
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Define DA.Bazel.Runfiles.locateResource as an alternative to locateRunfiles
* Use locateResource to get default dlint rules file
Fixes#15443
* Use locateResource to get scenario-service.jar
* Use locateResource to get ghc-pkg executable
* Use locateResource to get stable-packages directory
* Use locateResource to get ghcversion.h
* Use locateResource to get hpp executable
* Use locateResource to get builtin package dbs
* Drop unused function DA.Daml.Options.Types.getBaseDir
* Use locateResource to get d3{,plus}.min.js
* Use locateResource to get repl-service.jar
* data Resource now takes a runfilesPathPrefix instead of a runfilesPath
* Add hlint warning 'locateRunfiles/package_app'
* Let locateRunfiles crash when used outside of bazel target
* typo
* point to updated GHC
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Point to updated GHC
* Expect new interface view error message in ImplementsNonInterface
* Add test for trying to implement a non-interface
* Point to GHC with better error suppression, fix tests
* Remove unused TryImplementNonInterface
* Point to merged GHC
* Success!
* Remove dead / unnecessary code from debugging
* Remove unused `userWrittenTuple` helper
* Import `GHC.Types.magic` where necessary
* Test for example in issue #15338
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Remove fst/snd lint tests, which weren't correct/useful anyways
* Update DocTest to import GHC.Types where necessary
* Update desugar tests
* Fix daml repl to include GHC.Types import
* Add GHC.Types to the doctest
* style improvement: if cond then action else pure () -> when cond action
* Point to merged GHC
* Replace '1.dev only'=>'Daml-LF >= 1.15' in docs for interface functions
* Define coerceInterfaceContractId
* Test coerceInterfaceContractId in InterfaceContractDoesNotImplementInterface
* Test coerceInterfaceContractId in InterfaceConversions
* Add entry for coerceInterfaceContractId in interface reference docs
* update *.EXPECTED.desugared-daml files
changelog_begin
- [Daml Standard Library] Added function ``coerceInterfaceContractId``
changelog_end
* Extract helper _validate_dar in data_dependencies.bzl
* Generalize daml_script_test from daml_script.bzl
* Move regression test for #14291 into compatibility tests
changelog_begin
changelog_end
run-full-compat: true
The problem is that `damlcForTarget tools depLfVer` could return an older damlc
than needed for `targetLfVer`.
The reason this didn't fail before is that the legacy damlc supports up to
LF=1.14, and `lfVersionTestPairs` never had `depLfVer < 1.14 && targetLfVer > 1.14`
changelog_begin
changelog_end
* Remove mention of FunctionalDependencies as data-dependencies caveat
FunctionalDependencies in data-dependencies have been supported since #7698
changelog_begin
changelog_end
* Remove mention of advanced type system features as data-dependencies caveat
module DA.Generics and language extension DeriveGeneric have long been removed
from the language, and I couldn't think of other similar "advanced type
system features" that work for plain dependencies but not for data-dependencies.
* Extend list of data dependable extensions
* Point to fixed GHC
* Fix daml-test-files for improved GHC errors
* Fix error message to match critical parts of improved GHC errors
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* point to updated GHC
* Point to updated GHC
* Fix damlc tests for new GHC error messages
* Point to updated GHC
* Fix `instance Show Text` to produce escaped Text (#15177)
This adapts the code used in GHC's 'instance Show Char where { showList }', representing characters as single-character
'Text's using a type synonym. CPP can be used during development to switch to a newtype-based implementation in order
to check type safety.
changelog_begin
- [Daml Standard Library] ``show @Text`` now escapes special characters, producing syntactically correct expressions (#15177)
changelog_end
* Add daml-test-file testing `show @Text`
* Avoid 'explode' in 'showLitChr'
* Cleanup 'showLitChr'
* Update DarReaderTest.scala
* Clean up import of GHC.Base
* Add Note for __DEBUG__SHOW_TEXT_CHR_NEWTYPE macro
* Extract longStringSize from longStringOf in daml-test-file ShowText.daml
* Document differences with GHC implementation
* Remove redundancy between showLitChr and {ascii=>ctrlChrText}
* Add 'exhaustive' test case in daml-test-file ShowText.daml
* Change 'ctrlChrText' default case to throw error
The original implementation forces the caller to always use Text as the error type. This is unnecessarily restrictive as the types can be polymorphic on the caller's side.
CHANGELOG_BEGIN
* [Stdlib] Generalize the (<?>) operator to support a generic type for Validation
CHANGELOG_END
* Only report coverage for package-local choices/templates, add extra info
* Unify information for printTestCoverage
* Extract modules from all packages & local modules, not just tested ones
* Create reports about local/external choices/templates
* Remove unnecessary reporting
* Report local package coverage, external package coverage, all coverage
* Refactor printReport
* fix test, satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Fix another test
* Fix wording to `defined in local/external package`
* Check coverage against all modules in scope, not just tested modules
* Fix wording again, back to local/external modules - more accurate
* Replace TemplateInfo with Qualified Template
* Ensure daml preprocessor is only skipped when building 'daml-{prim,stdlib}'
changelog_begin
changelog_end
* Test that the daml preprocessor can't be skipped simply by changing the module name
* Add HasField instances for DA.Stack.SrcLoc (#15142)
changelog_begin
[DA.Stack] The SrcLoc datatype now supports dot syntax for field access (#15142)
changelog_end
* Add daml-test-file SrcLocFields to test dot syntax on DA.Stack.SrcLoc
* Define 'HasField f SrcLoc t' instances using record syntax
* Point to latest GHC with archive choices on interfaces
* Update Desugared daml for interfaces Archives
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-doc test files
* Add relevant identifiers to SignatureReaderSpec for iface Archive choice
* lint
* Point to GHC with generated HasArchive instance
* Add test for archive on interface
* Test that second archive doesn't work
* Update desugar tests
* Point to GHC merge
TLDR: Remove broken code which constructs stackTrace().
Happy never to have to read those NOTE(MH) comments in the pushLocation code again!
(1) This code was fundamentally broken for various reasons:
- It doesn't make sense to track location info on the continuation stack. The continuation stack is a record of the evaluation still to come; not a context for the current evaluation.
- Stack traces can't sensibly be provided in a language such as Daml which promises that tail-recursion is evaluated in constant stack-space.
- Attempting to keep location info on the continuation stack does not play well when exceptions are thrown and the stack is unwound.
(2) The stack-trace management code was also very hacky:
- The pushLocation code contained special cases when the continuation stack was headed by a KArg/SToken continuation. This is an internal implementation detail. The KArg doesn't even exist when we stop using the deprecated SEAppGeneral expression constructor.
- The pushLocation code also contained special support for copying stack-traces into SEVal and SDefinition caches, and then later back on to the continuation stack. Yuck!
(3) The stackTrace() code was barely used:
- Some time ago an alternative/simpler location tracking system (lastLocation) was implemented.
- Only ScenarioRunner makes use of the stackTrace()
- Only a single test changes behaviour when we drop use of stackTrace() in favour of getLastLocation
* Add test for typesignature.add codelens with HasField
* Reexport class HasField from DA.Internal.RebindableSyntax
* Update expected signature in test for typesignature.add codelens with HasField
changelog_begin
- [Daml Studio] Suggested type signatures no longer qualify HasField typeclass
See `#13790 <https://github.com/digital-asset/daml/issues/13790>`__.
changelog_end
* Update expected error in RelTimeDetailsHidden1 daml-test-file