Commit Graph

14 Commits

Author SHA1 Message Date
Stephen Compall
fef8a956ee use WithTxValue in place of VersionedValue more broadly (#643)
* GenTransaction.WithTxValue alias

* undo parts of parent dealing explicitly with serialization

* use GenNode.WithTxValue more often

* use Node*.WithTxValue more often
2019-04-24 13:54:41 +00:00
Martin Huschenbett
968bca7589 Check that contract keys are supported in DAML-LF type checker (#639)
Add a check to the Haskell implementation of the DAML-LF type checker to
make sure that the current DAML-LF version supports contract keys when they
are encountered.
2019-04-24 09:17:15 +00:00
Moritz Kiefer
416b0949fa Fix termination of scenario service on Windows (#629)
* Fix termination of scenario service on Windows

The lack of a proper Windows IO manager resulted in us being unable to
kill the conduits reading the output of the scenario service so `damlc
test` and `damlc ide` blocked forever. This PR fixes the problem by
shutting down the scenario service (by closing its stdin) before
killing the conduits .

* Use fail instead of error

* Add debugging output

* Remove debug output

* Bump timeout of perf test
2019-04-23 19:43:23 +00:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +02:00
Martin Huschenbett
667a63a9b1
Add location information to DAML-LF produced by damlc (#390)
* Add location information to DAML-LF produced by damlc

This is required to get error locations in the scenario view. Rigth now,
the location information for `create`/`exercise` still points to the
template/choice. I'll fix that in a separate PR.

* Fix test expectations

* Fix more tests
2019-04-11 21:44:48 +02:00
Jussi Mäki
1f2246c822 Do not divulge contracts to observers in nonconsuming exercises (#325)
* Do not divulge contracts to observers in nonconsuming exercises

Disables support for non-default ledger feature flags, as they
are meaningless since ledger server logic does not respect the flags.
Instead of large refactoring to add support for the old flag settings,
it is best to disallow the deprecated flags, and later on phase out the
flags completely.

Re-enables test_divulgence_of_token in sandbox semantic tests.

Fixes #157.

* purge LedgerFlags entirely...

...since we only support one version of them anyway, and clearing them

* updated release notes
2019-04-11 14:41:35 +02:00
Martin Huschenbett
be7ce7174f
Turn off -Woverlowed-literals in damlc (#375)
* Turn off -Woverlowed-literals in damlc

This flag does not play well with location information obtained via `-ticky`.
Also, the error message you get from overflowed literals suggests to use
`-XNegativeLiterals`, which is a bad idea since it changes the meaning of
`(-1)` from `\x -> x - 1` to `negate 1`.

* Fix module name in test

Co-Authored-By: martin-drhu-da <31696042+martin-drhu-da@users.noreply.github.com>
2019-04-11 13:52:22 +02:00
Remy
07858455c1
Fix DAML runtime for the new DAML-LF type Map (#204)
* add a test for daml-lf/interface
* fix scala code gen
* fix extractor
* fix navigator backend/frontend
* key of Map are strings in proto/json
2019-04-10 21:30:33 +02:00
david-md-da
e165f1df00
Tag errors as errors rather than debug messages (#360) 2019-04-10 17:49:43 +02:00
Jost Berthold
1d50cd6ca6
HOTFIX damlc: allow for passing options to the underlying GHC (#346)
* HOTFIX damlc: allow for passing options to the underlying GHC

As `damlc` is based on GHC, it "understands" all options that GHC understands.
This PR introduces a way to use GHC options that are not exposed by the `damlc`
driver, by passing any number of `--ghc-option CUSTOM_OPTION` on the command line.

The code uses the GHC function which parses options inside files, so
prohibiting a few options that we would not want to expose (package db, output
file, etc).

All warnings that GHC emits during flag processing are presented to the user.

If an option contradicts a DAML compiler setting, the compilation will be
aborted with a GHC exception (calls makeDynFlagsConsistent internally).

* HOTFIX damlc: small clean-up
2019-04-10 21:48:08 +10:00
Martin Huschenbett
ace1b5efd3
Remove all traces of the long gone value restriction (#256)
* Remove all traces of the long gone value restriction

We remove the value check since it has only been used by one `damli` command.
We also remove the constant folding from the DAML-LF simplifier. It is more
likely to diverge from the semantics of the interpreter than to do any good.

* Make hlint happy
2019-04-08 14:54:30 +02:00
Martin Huschenbett
b14bf471f0
Remove empty scaffolding for potential static authorization checker (#251)
* Remove empty scaffolding for potential static authorization checker

* Make hlint happy
2019-04-05 17:48:17 +02:00
Martin Huschenbett
7c3cd8840b
Remove DefValueInfo data type (#252)
This was used by the old DAML-LF based record constructor/projection
inliner. We'bve recently replaced by an inlining mechanism which is part
of the conversion from GHC Core to DAML-LF.
2019-04-05 16:47:08 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00