Commit Graph

17 Commits

Author SHA1 Message Date
Moritz Kiefer
69da1d6379 Implement AnyTemplate in DAML (#2947)
* Implement AnyTemplate in DAML

* Fix doctest path

* Shuffle around CPP

* Do not hide anything

* Hide it again

* Clean build

* Enable caching again

* debug windows crap

* more tests

* reinstantiate full tests
2019-09-19 08:42:55 +00:00
Moritz Kiefer
9992bdbd2f
Support cpp in doctests (#2957)
* Support cpp in doctests

* debugging lalalala

* More debugging
2019-09-18 17:36:42 +02:00
Robin Krom
aa1e95173a
language: check dflags for errors (#2748)
* language: check dflags for errors

We add a check when we build the dflags for cases that will lead to a
failed build and emmit a clearer error message. Currently this only
includes a check, to see whether the current installed unit id is also
imported as a package from the package database.

* exclude ghc-prim from check

* exclude code generation from dflag check

* add an internal option to turn dflags check off
2019-09-06 21:24:46 +02:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
Robin Krom
829cb4cef5
Daml stdlib with versions (#2479)
* language: build daml_stdlib with a version in the package name.

* versioned daml-stdlib in damlc

* reformat bazel files

* fix daml_doc_test
2019-08-12 16:05:28 +02:00
Moritz Kiefer
5aa3cba949
Add a damlc doctest command and test the standard library (#2157)
There is lots of room for improvements here but I think this is a good
first step. The 3 main things that could be improved imho are:

- Rewrite source locations to point to the original file rather than
  the generated module

- Provide some way to declare things like imports or more general,
  setup code that is added to the generated module.

- Prettier/more helpful output during a run, e.g., print the list of
  successful tests.
2019-07-16 15:51:01 +02:00
Moritz Kiefer
bb3a98bf61
Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Andreas Herrmann
93d8e01db2
Update rules_haskell and static GHC (#1515)
* Update rules_haskell and static GHC

Remove patches that have been upstreamed or are no longer required.
Update still required patches to match the new rules_haskell version.

Previously we patched rules_haskell to coerce GHC into using static
Haskell libraries in most places. In particular we moved hs-libraries
entries into extra-libraries entries in the package configuration files.
A much cleaner approach is to compile GHC with a static RTS, then GHC
will by itself choose to load static Haskell libraries.

* Remove haskell_cc_import

* da-hs-daml-cli -> daml-cli

* da-hs-damlc-app -> damlc-app
2019-07-01 13:26:19 +02:00
Michał Majcherski
2afefb7883
windows: root build (#1894)
* windows: root build

* windows: fixed haskell bindings tests

* windows: disable client_server_test test

* windows: marking daml_test flaky due to #1907

* windows: removing da-hs-damlc-app run from build.ps1

* windows: disable hie-core alias of currently disabled target
2019-06-28 12:55:31 +02:00
Andreas Herrmann
27ba8a77c8
daml_test: Take damlc runfiles into account (#1607)
Closes #1593
2019-06-12 17:18:45 +02:00
Andreas Herrmann
1a80106753
damlc test --files (#1409)
* Add test case for damlc test-files

* Separate damlc test-files from damlc test

* Fix rules_daml/daml.bzl daml_test

* damlc test-files --> damlc test --files

The project options are still relevant for the --files case, as it may
be necessary to change into the project root directory in order to
locate the project package database.
2019-05-28 15:36:42 +02:00
Leonid Shlyapnikov
f31980c18f Add Scala codegen bazel rule: dar_to_scala (#1202)
* Removing unused/broken daml.bzl rules, adding Scala codegen rule

Scala codegen rule: dar_to_scala follows the same approach
as dar_to_java with a few differences:
- dar_to_scala supports multiple dars as an input
- dar_to_scala does not try to compile the generated scala (separation
  of responsibilities)

* Using dar_to_scala to compile quickstart-scala example

* Fixing formatting

* Add dependency to examples-quickstart-scala-bin

So if example does not compile, it can't be published.

* Fixing the path to the jar executable

* Changing scala codegen rule to rely on zipper instead of jar

JDK's jar creates srcjar with timestamped files, zipper doesn't
timestamp files. This means we can create reproducible/deterministic/
cacheable srcjars

* Addressing code review comments, wrong var name
2019-05-20 14:13:30 +00:00
moritzkiefer-da
dff9f17ac6 Remove damli completely (#481)
The only command that we still had in damli which afaik isn’t
something anyone uses (and if it is, we should move it do damlc).
2019-04-15 14:47:59 +02:00
moritzkiefer-da
f6c6dd6a9a
Accept multiple files in damlc test (#436)
* Accept multiple files in damlc test

Since damlc test also runs tests in transitive dependencies, this can
be significantly faster than running "damlc test" individually on
a set of files as you will end up recompiling and rerunning tests
multiple times if those files depend on each other.

For //docs:daml-ref-daml-test This is roughly a 10x improvement from
~70s to ~7s.
2019-04-12 16:21:34 +02: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
Robin Krom
a8b2d30b3d
Stdlib package (#229)
language: ship daml-stdlib as a package
2019-04-05 18:11:13 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00