Commit Graph

367 Commits

Author SHA1 Message Date
Gary Verhaegen
0e9cb10f7d
optionally get canton EE (#17039) 2023-06-27 11:00:24 +02:00
Krisztian Pinter
fed6e1ab7a
Add cabal support for some components (#16755) 2023-06-05 17:07:31 +02:00
dylant-da
943e140bbb
Add test generator for keeping Cabal files in sync (#16864)
* wip

* Add generate_cabal{_and_track}_cabal for keeping cabal files in sync

* lint

* Disable generate_and_track_cabal on windows

* Fix build script to generate comments on separate lines

* Fix sorting, detect alias rules for ghc-lib-parser

* allow specifying file in generate_and_track_cabal

* Fully qualify path to cabal generation target

* Add handler for daml_lf_dev_archive_haskell_proto

* fix trailing T;p

---------

Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2023-05-23 10:00:02 +01:00
Samuel Williams
434b33d1e5
Fix name clashes with choices (#16858)
* Fix name clashes with choices

* Update ghc version
2023-05-18 15:24:40 +01:00
nickchapman-da
629439d876
[engine] choice authority syntax (#16602) 2023-03-29 15:19:47 +02:00
nickchapman-da
4298cde9d2
[compiler] avoid confusing emacs (#16597) 2023-03-23 13:04:49 +00:00
Moisés Ackerman
c423e8d151
Update "Working on ghc-lib" dev docs (#16574)
* Update ghc-lib/new-working-on-ghc-lib.md

* Update GHC_REV
2023-03-21 15:34:08 +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
Samuel Williams
3d70f2acd9
Update ghc from last ticket (#16446) 2023-03-02 15:40:48 +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
mziolekda
d8d55ca412
upgrade to scala 2.13.10 (#16423)
* update build system to scala 2.13.10

* fix failing scala files

* format

* fix compatibility

* resolve conflict on maven_install_2.13.json
2023-02-28 23:21:53 +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
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
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
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
Moisés Ackerman
8784ebd9ce
Add choiceController and choiceObserver functions (#16088)
* Add daml test file for choice functions

* Add HasChoice{Controller,Observer} type classes

* Add choice_{controller,observer} in LF

* Update GHC_REV

* Generate HasChoice{Controller,Observer} instances

* Remove manual instances in daml test file for choice functions

* Remove/forbid choice{Controller,Observer} before featureChoiceFuncs

* update *.desugared-daml golden files

* Apply code review suggestion

* Update GHC_REV (da-master-8.8.1)

Co-authored-by: Remy <remy.haemmerle@daml.com>
2023-01-18 14:50:00 +00:00
dylant-da
03a76f4a61
Turn Daml-specific errors into suggestions on the original error (#16017) 2023-01-11 15:44:45 +00:00
dylant-da
0701488c40
Fix return type error for methods (#15999)
* Add tests for method result mismatches & for interface synonyms

* point to updated ghc
2023-01-06 12:54:34 +00:00
Gary Verhaegen
151e12b81a
bump copyright (#16002)
This is the result of:

- Updating `./COPY` to say `2023`.
- Running `./dev-env/bin/dade-copyright-headers update .`
2023-01-04 18:21:15 +01:00
dylant-da
445104a41b
Custom error / fix error for wrong expected return type of a choice. (#15855)
* Point to updated GHC

* add test for choice result mismatch

* add test for interface

* point to updated ghc

* point to merged ghc
2022-12-13 18:08:32 +00:00
dylant-da
f9d7301024
Fix erroneous code action/lens suggestions in Daml Studio (#15731)
* 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
2022-12-13 12:06:40 +00:00
Stephen Compall
d14a6441e3
close the gap between scalac -Xlint and our global options (#15799)
* add -Xlint options requiring no changes

* add -Xlint:recurse-with-default

- very minor code changes

* factor http-json hj_scalacopts duplication

* use lf_scalacopts_stricter in libs-scala where NonUnitStatements was

* use hj_scalacopts in api-type-signature

* add nonlocal-return and nullary-unit to hj_scalacopts

* commented-out excluded options

* add unit-special globally

* check implicit-recursion for clients code
2022-12-07 16:08:33 +00:00
Moisés Ackerman
badfb9dcea
Improve error message for attempted use of '..' in record update (#15712)
* Update GHC_REV

* Add test case
2022-12-01 10:07:29 +01:00
Claudio Bley
e766f91338
Generate CSV file from all test evidences for ledger client components (#15372)
* Add new security categories

* Use test-security framework for OAuth2 middleware

* Regenerate `security-evidence.md`

* Explicitely exit the test-evidence generator

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Add //ledger-service/http-json:integration-tests-lib to evidence generator

* Skip maven artefacts on the classpath

The checker framework artefact (`checker-2.5.4.jar`) causes an `IllegalAccessError` when included in the runpath:
```
Exception in thread "main" java.lang.IllegalAccessError: class com.sun.tools.javac.code.Scope$ImportScope$ImportEntry cannot access its superclass com.sun.tools.javac.code.Scope$Entry (com.sun.tools.javac.code.Scope$ImportScope$ImportEntry is in unnamed module of loader java.net.URLClassLoader @31000e60; com.sun.tools.javac.code.Scope$Entry is in module jdk.compiler of loader app)
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at org.scalatest.tools.SuiteDiscoveryHelper$.isDiscoverableSuite(SuiteDiscoveryHelper.scala:204)
	at org.scalatest.tools.SuiteDiscoveryHelper$.processClassName(SuiteDiscoveryHelper.scala:243)
	at org.scalatest.tools.SuiteDiscoveryHelper$.$anonfun$processFileNames$1(SuiteDiscoveryHelper.scala:279)
	at scala.collection.Iterator$$anon$9.next(Iterator.scala:577)
	at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:474)
	at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:576)
	at scala.collection.immutable.List.prependedAll(List.scala:152)
	at scala.collection.immutable.List$.from(List.scala:684)
	at scala.collection.immutable.List$.from(List.scala:681)
	at scala.collection.IterableFactory$Delegate.from(Factory.scala:288)
	at scala.collection.immutable.Iterable$.from(Iterable.scala:35)
	at scala.collection.immutable.Iterable$.from(Iterable.scala:32)
	at scala.collection.IterableFactory$Delegate.from(Factory.scala:288)
	at scala.collection.IterableOnceExtensionMethods$.toIterable$extension(IterableOnce.scala:178)
	at org.scalatest.tools.SuiteDiscoveryHelper$.processFileNames(SuiteDiscoveryHelper.scala:285)
	at org.scalatest.tools.SuiteDiscoveryHelper$.$anonfun$discoverSuiteNames$1(SuiteDiscoveryHelper.scala:132)
	at scala.collection.immutable.List.map(List.scala:250)
```

* Regenerate `security-evidence.md`

* Convert remaining TEST_EVIDENCE stanzas of HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Print warning when a test suite could not be loaded

* Fix typo

* Use test-security framework for HTTP JSON

* Read files in tests lazily

The test-evidence generator tool needs to instantiate scalatest test suites in order
to access the tagged tests and collect relavant test entries.

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for trigger service

* Use structural type to call `in` and `ignore` for different classes

* Remove Authentication category from EvidenceSecurity tool

There are no TEST_EVIDENCE annotations anymore.

* Add required trigger-runner-lib


* Import `scala.language.reflectiveCalls` where it is needed

* Remove left-over comments

* Add `test_evidence_binary` scala binary rule

This rule is a customized `scala_binary` rule which also accepts a `tests` attr and
generates a runpath file which is later consumed by scalatest to detect the relevant
scalatest test suites.

* Process test suites, add transitive deps

* Support nested tests_suites in `test_evidence_binary`

* Remove debug print's

* Add missing dependencies to test-evidence:generator

* Abort if test suites cannot be loaded

* Cleanup

* Reinstate scalacopts in http-json

* Reword the test description to not drop information

* Fix typo

* Explicitly exit the JVM on exceptions

This is required since non-daemon threads also prevent JVM shutdown when an exception was thrown.

* Format test-evidence/BUILD.bazel

* Resolve file paths lazily

This avoids a `NullPointerException` on Windows where Runfiles.rlocation returns `null`.

* Document new Security properties

* Print target directory and file name

* Clarify test descriptions

* Replace duplicate Security properties

Co-authored-by: Stephen Compall <stephen.compall@daml.com>Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-11-29 12:35:22 +01:00
mziolekda
a02c30440a
remove deprecated warnings everywhere [DPP-1281] (#15661)
* remove deprecated warnings in /ledger

* update generated documentation
2022-11-24 12:05:08 +00:00
dylant-da
ff6e776da0
Improve type error for Numeric types with precision > 37 and mistyped/missing field access (#15626)
* 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
2022-11-22 15:44:25 +00:00
dylant-da
ccde982df5
Error for implementing non-interfaces (#15435)
* 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
2022-11-22 11:07:21 +00:00
Moisés Ackerman
c15617e87d
Fix view in view method definition (#15595)
* Update GHC_REV

* Update *.EXPECTED.desugared-daml

* Add regression test for #15459

* Method-in-method test now checks runtime behavior
2022-11-21 09:34:51 +00:00
dylant-da
c6d10b6246
Remove GHC.Tuple.Check module (#15549)
* 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
2022-11-14 18:29:35 +00:00
dylant-da
bb67fb7f51
Move userWrittenTuple check into own helper in GHC.Tuple.Check (#15445)
* 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>
2022-11-11 15:59:29 +00:00
Remy
49f4d2979e
[LF] strengthen compilation flags (#15481) 2022-11-09 14:12:04 +01:00
dylant-da
27f0f2b014
Catch mistyped view implementations via better Daml-specific type error detection (#15426)
* 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
2022-11-08 17:57:06 +00:00
dylant-da
1f2c728113
Fix overeager tuple warning (#15418)
* 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
2022-11-04 17:16:34 +00:00
dylant-da
a205378b7a
Point to merged GHC changes for AnyView (#15343)
* Point to merged GHC

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-25 13:23:11 +00:00
dylant-da
da8064de64
Add AnyView with HasFromAnyView instances (#15280)
* Implement AnyView as a stable package / primitive

* Point to updated GHC

* Export AnyView datatype, move typeclasses, fix convertPrim

* Adjust AnyView w/ InterfaceTypeRep, implement {to,from}AnyView

* fix lint, satisfy changelog

CHANGELOG_BEGIN
CHANGELOG_END

* fix daml-desugar

* Has{From,To}AnyView instances in daml-docs

* Add DA.Internal.Interface.AnyView to LibraryModules for stdlib

* Fix hash for DA.Internal.Interface.AnyView

* Prefix AnyView with CurrentSdk, add to golden for daml-script test

* Remove HasToAnyView

* Split AnyView into AnyView and AnyView.Types

* fix hash

* Remove unused StandaloneDeriving

* Add HasField instances (requires relevant workers)

* Accept desugaring test changes for removal of HasToAnyView

* Update daml-doc for removal/modification of HasToAnyView/HasFromAnyView

* Update StablePackage hash for DA.Internal.Interface.AnyView.Types
2022-10-25 11:49:32 +00:00
tudor-da
1a4ef5b238
Revert "Upgrade dependencies to their latest stable release (#15216)" (#15309)
This reverts commit 1454497f

changelog_begin
changelog_end
2022-10-24 08:33:37 +02:00
Remy
b0d840019b
[Script] Do not use type constructor in AnyInterfaceChoice anymore (#15188)
companion PR of digital-asset/ghc#137

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-20 10:30:20 +00:00
dylant-da
0efadf61eb
GHC - Extract more info about templates (#15170)
* 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
2022-10-19 15:47:45 +00:00
Gerolf Seitz
1454497f3a
Upgrade dependencies to their latest stable release (#15216)
The outdated dependencies where determined by running
`bazel run @maven//:outdated`.

Not all dependencies are brought up to the latest version available on
Maven Central, for the following reasons:

Nobody dares to touch DB:
  com.oracle.database.jdbc:ojdbc8 [19.14.0.0 -> 21.7.0.0]
  com.oracle.database.jdbc.debug:ojdbc8_g [19.14.0.0 -> 21.7.0.0]
  com.h2database:h2 [2.1.210 -> 2.1.214]
  org.flywaydb:flyway-core [8.4.1 -> 9.4.0]

License issues beyond version 2.6.x:
  com.typesafe.akka:akka-actor_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-actor-testkit-typed_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-actor-typed_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-http_2.13 [10.2.8 -> 10.4.0-M1]
  com.typesafe.akka:akka-http-spray-json_2.13 [10.2.8 -> 10.4.0-M1]
  com.typesafe.akka:akka-http-testkit_2.13 [10.2.8 -> 10.4.0-M1]
  com.typesafe.akka:akka-slf4j_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-stream_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-stream-testkit_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-testkit_2.13 [2.6.18 -> 2.7.0-M3]

Not a stable release:
  com.chuusai:shapeless_2.13 [2.3.3 -> 2.4.0-M1]
  io.circe:circe-core_2.13 [0.14.3 -> 0.15.0-M1]
  io.circe:circe-generic_2.13 [0.14.3 -> 0.15.0-M1]
  io.circe:circe-parser_2.13 [0.14.3 -> 0.15.0-M1]
  org.scalameta:munit_2.13 [0.7.29 -> 1.0.0-M6]
  org.scalactic:scalactic_2.13 [3.2.14 -> 3.3.0-SNAP3]
  org.scalatest:scalatest_2.13 [3.2.14 -> 3.3.0-SNAP3]
  org.scalatestplus:scalacheck-1-15_2.13 [3.2.11.0 -> 3.3.0.0-SNAP3]
  org.scalatestplus:selenium-3-141_2.13 [3.2.10.0 -> 3.3.0.0-SNAP3]
  org.scalatestplus:testng-6-7_2.13 [3.2.10.0 -> 3.3.0.0-SNAP3]
  org.tpolecat:doobie-core_2.13 [0.13.4 -> 1.0.0-RC2]
  org.tpolecat:doobie-hikari_2.13 [0.13.4 -> 1.0.0-RC2]
  org.tpolecat:doobie-postgres_2.13 [0.13.4 -> 1.0.0-RC2]
  com.fasterxml.jackson.core:jackson-core [2.13.4 -> 2.14.0-rc2]
  com.fasterxml.jackson.core:jackson-databind [2.13.4 -> 2.14.0-rc2]

Netty + boringssl + grpc + protobuf need be kept in sync, and the latest
versions also aren't stable releases:
  io.netty:netty-buffer [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-codec-http2 [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-handler [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-handler-proxy [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-resolver [4.1.79.Final -> 5.0.0.Alpha2]
  com.google.protobuf:protobuf-java [3.21.7 -> 4.0.0-rc-2]

Scalaz changed a few annoying things in 7.3, so let's stick to 7.2:
  org.scalaz:scalaz-core_2.13 [7.2.34 -> 7.4.0-M12]
  org.scalaz:scalaz-scalacheck-binding_2.13 [7.2.34-scalacheck-1.15 -> 7.4.0-M12]
  org.scalacheck:scalacheck_2.13 [1.15.4 -> 1.17.0]

Determined by the rules_scala:
  org.scala-lang:scala-library [2.13.8 -> 2.13.10]

CHANGELOG_BEGIN
Upgraded to the latest stable version of the following JVM dependencies:

ch.qos.logback:logback-classic:1.4.4
ch.qos.logback:logback-core:1.4.4
com.auth0:java-jwt:4.1.0
com.auth0:jwks-rsa:0.21.2
com.fasterxml.jackson.core:jackson-core:2.13.4
com.fasterxml.jackson.core:jackson-databind:2.13.4
com.github.ben-manes.caffeine:caffeine:3.1.1
com.github.pathikrit:better-files_2.13:3.9.1
com.github.pureconfig:pureconfig-core_2.13:0.17.1
com.github.pureconfig:pureconfig-generic-base_2.13:0.17.1"
com.github.pureconfig:pureconfig-generic_2.13:0.17.1
com.github.pureconfig:pureconfig_2.13:0.17.1
com.github.scopt:scopt_2.13:4.1.0
com.google.code.gson:gson:2.9.1
com.lihaoyi:pprint_2._13:0.8.0"
com.lihaoyi:sourcecode_2.13:0.3.0
com.sparkjava:spark-core:2.9.4
com.squareup:javapoet:1.13.0
com.storm-enroute:scalameter-core_2.13:0.21
com.storm-enroute:scalameter_2.13:0.21
com.thesamet.scalapb:scalapb-json4s_2.13:0.12.0
com.typesafe.scala-logging:scala-logging_2.13:3.9.5
com.zaxxer:HikariCP:5.0.1
commons-io:commons-io:2.11.0
eu.rekawek.toxiproxy:toxiproxy-java:2.1.7
io.circe:circe-core_2.13:0.14.3
io.circe:circe-generic-extras_2.13:0.14.2
io.circe:circe-generic_2.13:0.14.3
io.circe:circe-parser_2.13:0.14.3
io.circe:circe-yaml_2.13:0.14.1
io.github.paoloboni:spray-json-derived-codecs_2.13:2.3.9
io.reactivex.rxjava2:rxjava:2.2.21
io.spray:spray-json_2.13:1.3.6
javax.annotation:javax.annotation-api:1.3.2
javax.ws.rs:javax.ws.rs-api:2.1.1
junit:junit-dep:4.11
junit:junit:4.13.2
net.logstash.logback:logstash-logback-encoder:7.2
org.apache.commons:commons-lang3:3.12.0
org.apache.commons:commons-text:1.10.0
org.awaitility:awaitility:4.2.0
org.checkerframework:checker-qual:3.26.0
org.checkerframework:checker:3.26.0
org.codehaus.janino:janino:3.1.8
org.freemarker:freemarker-gae:2.3.31
org.jline:jline-reader:3.21.0
org.jline:jline:3.21.0
org.junit.jupiter:junit-jupiter-api:5.9.1
org.junit.jupiter:junit-jupiter-engine:5.9.1
org.junit.platform:junit-platform-engine:1.9.1
org.junit.platform:junit-platform-runner:1.9.1
org.mockito:mockito-core:4.6.1
org.mockito:mockito-inline:4.6.1
org.mockito:mockito-scala_2.13:1.17.12
org.pcollections:pcollections:3.2.0
org.playframework.anorm:anorm-akka_2.13:2.7.0
org.playframework.anorm:anorm_2.13:2.7.0
org.postgresql:postgresql:42.5.0
org.reactivestreams:reactive-streams-tck:1.0.4
org.reactivestreams:reactive-streams:1.0.4
org.reflections:reflections:0.10.2
org.sangria-graphql:sangria-ast_2.13:3.4.0
org.sangria-graphql:sangria-core_2.13:3.4.0
org.sangria-graphql:sangria-derivation_2.13:3.4.0
org.sangria-graphql:sangria-parser_2.13:3.4.0
org.sangria-graphql:sangria-spray-json_2.13:1.0.3
org.scala-lang.modules:scala-parallel-collections_2.13:1.0.4
org.scalactic:scalactic_2.13:3.2.10
org.scalameta:munit_2.13:0.7.29
org.scalatest:scalatest_2.13:3.2.10
org.scalatestplus:scalacheck-1-15_2.13:3.2.10.0
org.scalatestplus:selenium-3-141_2.13:3.2.10.0
org.scalatestplus:testng-6-7_2.13:3.2.10.0
org.scalaz:scalaz-core_2.13:7.2.34
org.scalaz:scalaz-scalacheck-binding_2.13:7.2.34-scalacheck-1.15
org.seleniumhq.selenium:selenium-java:4.5.0
org.slf4j:slf4j-api:2.0.3
org.slf4j:slf4j-simple:2.0.3
org.testng:testng:6.7
org.typelevel:cats-core_2.13:2.8.0
org.typelevel:cats-kernel_2.13:2.8.0
org.typelevel:cats-laws_2.13:2.8.0
org.typelevel:paiges-core_2.13:0.4.2
org.wartremover:wartremover_2.13.8:3.0.6
org.xerial:sqlite-jdbc:3.39.3.0
CHANGELOG_END
2022-10-18 08:50:23 +02:00
dylant-da
485eb2b8dd
Archive choices for interfaces (#15085)
* 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
2022-09-29 10:57:07 +01:00
dylant-da
7db1bfab54
Point to GHC with merge commit for large tuples branch (#15062)
* Point to GHC with merge commit for large tuples branch

https://github.com/digital-asset/ghc/pull/134

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-22 11:45:23 +01:00
dylant-da
89e2f4db9b
Add warnings to conversion, Warn for tuples size > 5 (#15018)
* 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
2022-09-21 14:16:39 +01:00
dylant-da
931734d59c
PoC: Custom errors, for Interfaces (#14950)
* 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
2022-09-15 12:53:30 +00:00
Moisés Ackerman
3ac7d87498
Monomorphize interface methods and choices (#14853)
* Update ghc rev

* Update daml-test-file InterfaceGuarded

* Add daml-test-files for interface method and choice monomorphicity

* Update daml-test-files *.EXPECTED.desugared-daml

* Update daml-test-files *.EXPECTED.{md,rst}

* Fix data-dependencies tests

* Fix ide test

* Update code-snippets-dev/Interfaces.daml

* Update interface reference docs to reflect monomorphic methods and choices

* Apply suggestions from code review

changelog_begin
changelog_end

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-08-29 16:24:35 +02:00
dylant-da
4f4aa63fde
Change ghc version to point to merged distinguish guards commit in GHC (#14840)
CHANGELOG_BEGIN
CHANGELOG_END
2022-08-25 14:37:51 +00:00
dylant-da
6ece737e46
Desugar guards compatibly with 1.15/1.dev split (#14773)
* Add version 1.15 - move interfaces into them

* Update Ast/Version & docs for 1.15, split interface into simple/extended

* Stage 1.15 protobuf

* Remove references to dev from 1.15 protobufs

* Add Tests file for 1.15 in ledger API testtool

* Update Version 1.15 changelog with Call/implements

* Make 1.14 default again

* Add 1.15 as preview version

* Add 1.15 test suite to testtool

* Reinclude 1.15 in COMPILER_LF_VERSIONS to build model-tests-1.15

* Move v1_15 ledger-api-tests into own suite

* Fix InterfaceNotSupported message to 1.15 or higher

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END

* Update tests with extended interface features to only run on 1.dev

* Allow unsafe_from_interface and interface_template_type_rep in 1.15

* Fix StableVersions back to 1.14, make EarlyAccessVersions 1.15

* Run retroactive implements tests only in extended interfaces

* lint

* Temporarily disable 1.15 conformance tests - handle in another PR

* Also disable conformance-test-tls1.2-or-newer-1.15

* Disable PureConfigReaderWriter tests that assume early-access == stable

* lint

* Temporarily disable decode extended interface primitives test

* Use dictionary comprehension to generate ledger/test-common test_names

* Move InterfaceSubscriptionsIT test back into 1.dev suite

* lint

* Make exercise guards nullable, ignore Nothing in decode/encode

* Desugar UExerciseInterface[Guarded] differently, point to updated GHC

* Update to new GHC revision, removes pred argument from `exercise`

* Attach correct range to guard support error (if any)

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

* Rename interface features

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

* Remove unnecessary mention of v1_14 from supportedInputVersions

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

* Clarify purpose of `Maybe Expr` type for exercise guard

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

* Remove guarded exercise when Extended Interfaces are not enabled

* Remove all instances of guarded exercises in versions <= 1.15

* Add check for isId to splitDFunId

* Exclude via $cexerciseGuarded check - ClassOpId approach did not work

* Run damlc interface tests w/o requires when since DAML_INTERFACE

* Update desugared daml for UExerciseInterface[Guarded] generation

* Temporarily disable failing damlc tests

* Remove 1.dev-only references from 1.15 protobuf

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-08-25 14:20:03 +01:00
Moisés Ackerman
009c3c306b
Add interface instance syntax, including retroactive interface instances (#14715)
* Extract qualifyLocally in LFConversion

* Update ghc rev

* Add parent type argument to interface instance desugaring types

* Check interface instance parent in LFConversion

* Convert interface instances in interface declarations

* Update daml-test-files to use 'interface instance' syntax

* Update other tests to use 'interface instance' syntax

* Update interface reference docs to use 'interface instance' syntax

* Update other files to use 'interface instance' syntax

* Add todo in DA.Daml.LF.Ast.Pretty

* Add daml-test-files for retroactive interface instances

changelog_begin
changelog_end
2022-08-17 12:06:59 +00:00
dylant-da
b73e852604
Better errors related to Interface Views (#14648)
* Point to new GHC with errors for missing views

* Add placeholder view to ImplementsNonInterface

* Fix doc comment in InterfaceViewNotSpecified

* Add test for error when method named `view` is declared

* Add placeholder unit viewtype to doc tests

* Update err message in ImplementsNonInterface - error now detected in LF

* empty changelog commit

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-10 13:45:25 +00:00
Remy
b163638d19
Damlc: Remove precondition for interface (#14548)
* Damlc: Remove precondition for interfaces

follow up of #14511, goes together with digital-asset/ghc#129

* Address Ackerman's review

* Update ghc rev

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-28 16:34:12 +00:00
dylant-da
87938faaf7
DAML Views - Syntax Only (#14435)
* Point to new GHC version with viewtype and view syntax

* Make minimum modifications to erase newly generated view code

CHANGELOG_BEGIN
CHANGELOG_END

* Point to updated GHC - no longer requires viewtype/view at syntax level

* Add DA_Internal_Interface to convertTypeDef exclusion check

* Move desugared types/values for interface views into DA.Internal.Desugar

* Disable unused TypeFamilies extension in DA.Internal.Interface

* Point to updated GHC, "Remove shortViewName"

* Update to latest GHc view syntax changes

* Update GHC to merged view syntax changes
2022-07-26 16:57:51 +00:00