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
Avoid construction of unrestricted speedy expression applications.SEApp (alias for SEAppGeneral)
- Replace occurrences of SEApp(General) to use SEAppAtomic, with SELet1 as required
- Add new helper SEApp for many cases where arguments are simple values.
- Rename the most general unrestricted constructor as SEAppGeneral_DEPRECATED. The only remaining use is by fromUpdateSExpr and fromScenarioSExpr, due to our unprincipled approach to stack-trace. See TODO in pushLocation. I hope to fix this in a future PR.
- Rename the slightly less unrestricted constructor as SEAppOnlyFunIsAtomic_DEPRECATED. The only call site being in Anf.scala (for the case when ANF is not performed). Maybe one day we can perform ANF in all cases, and hence remove this one remaining usage.
* Add warnings to conversion
* Fix warning code, add warning for tuples larger than 5 in convertType
* Add flag AllowLargeTuples to ignore when tuples of size > 5 are used
* Predicate tuple warning on AllowLargeTuples flag
* Compile stdlib / prim packages with --allow-large-tuples
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Fix type error in LFConversion test due to runConvertM signature change
* Move warning to convertDataCon, so un-type-annotated uses are detected
* Add TODO
* Add codeGenAllowLargeTuples internal function to DA.Internal.Desugar
* Unsplit convertDataCon and convertDataCon' via envAllowLargeTuples check
* Desugar codeGenAllowLargeTuples call to allow large tuples on subexprs
* Point to GHC with auto-inserted codeGenAllowLargeTuples calls
* Reorder codeGenAllowLargeTuples replacement to be before internals check
* Export codeGenAllowLargeTuples from DA.Internal.Desugar
* Reverse warnings at end of ConvertM run
* Comment role of Either and tuple in ConvertM
* Rename --allow-large-tuples=yes to --disable-warn-large-tuples=yes
* Make disable_warn_large_tuples an option, false by default
* Add tests for tuple size warning
* Use minimum tuple size to trigger large tuple warning
* Disable large tuple warning during stdlib compilation
* Use a pattern synonym for tuple detection
* lint
* Make damlc options fail if used more than once
* Fix import issues with optparse-applicative
* Undo `optionOnce` conversion for arguments that should occur many times
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Improve comments
* Add tests for optionOnce behaviour
* lint
* Point to GHC version with custom typecheck interface error messages
* Fix tests for new messages
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Point to GHC revision with TcDaml module & minor fixes
* Add TcDaml to ghc-lib.cabal
* Point to GHC: better HasMethod msg, uses PrelNames
* Point at non-PrelNames approach - turns out that didn't work
* Point to GHC with multiple module checks
* Point to GHC with tentative PrelNames work fully removed
* Add tests for new "non existent method" and "view" error messages
* Point to merged GHC changes
* Add test case
* Restart UniqSupply on every call of setupDamlGHC
changelog_begin
- [data-dependencies] Fixed an issue where packages with data-dependencies would get non-deterministic package ids (`#14936 <https://github.com/digital-asset/daml/issues/14936>`__).
changelog_end
* Improve error for wrong viewtypes
* Add tests for new viewtype errors
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Use strict foldl
* Update tests to be non-hyphenated
* Allow EExpectedViewType to define own article
* Use _TApps instead of _TypeSplitApp
* Remove hyphen from "type-constructor" in EExpectedViewType
* Add article to EExpectedViewType messages
* Improve EExpectedViewType errors for unexpected Type, add particle
* Fix tests for improved viewtype errors
* Add 'damlc validate-dar' test case for interface definition
* Add failing 'damlc validate-dar' test cases for interface instances
* Remove instance MonoTraversable e (NameMap a) from Data.NameMap
* Add (orphan) instance MonoTraversable ModuleRef (NameMap a) in DA.Daml.LF.Ast.Optics
* Data.NameMap: remove runtime check on HOF name changes
changelog_begin
changelog_end
* Make InterfaceGuardedNotExtended error out with guard message
* Move ConvertM into own module, make convertPrim failable
* Error out when exerciseGuarded is called
* Remove _exerciseDefault, now unused
* Error at runtime if _exerciseInterfaceGuard called in <= LF 1.15
* Add InterfaceChoiceGuardFailedNotExtended - test guarded exercises error
* lint
* Satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Only error on exerciseGuarded if extended interfaces are NOT supported
* Make convertPrim impure - handle strict errors by inserting runtime errs
* Use ifdef/else/endif instead of ifdef/endif/ifndef/endif
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Add per interface choice context in serializability checks
* Update expected errors in daml-test-files
* Drop done todo
* Keep TyCon in InterfaceBinds
* Move convertInterface to top level
* convertInterface now returns a list of definitions
* Refactor convertInterface
* Create interface data type def in convertInterface
* Check for featureSimpleInterfaces in convertInterface
* Check for featureSimpleInterfaces in convertInterfaceInstance
* cleanup convertRequires
* Validate that an interface type constructor has no parameters
changelog_begin
changelog_end