* Make the ScenarioService take an IO callback, not STM
* Remove a redundant space
* Use IO in preference to STM where we really don't care which is in use
* #564, always print out diagnostics for tests
* #564, fix getting the scenario names so if they can't be computed you give an answer
* Add a proper data type to represent pass/fail in the tests
* Centrailse printing a failure message
* Pull the test execution into a separate file, ensuring it always gives back an exit code
* Use nubOrd instead of Set
* Clean up how we figure out which files to test
* Fail if there are any errors
* Delete all the brittle failure tracking stuff
* Rename the compiler handle to h
* Only print out the successful results to stdout, since the unsuccessful ones end up in diagnostics
* Make JUnit output still print out the test results
* Make JUnit print out all the details
* Delete the stdio command path
* Break the bigger pieces apart in the test runner
* Inline testJUnit
* Shorten to UseColor
* Shorten to color
* Inline and comment part of the JUnit tests
* HLint
* Update daml-foundations/daml-tools/da-hs-daml-cli/DA/Cli/Damlc/Test.hs
Co-Authored-By: neil-da <35463327+neil-da@users.noreply.github.com>
* Fix an HLint refactoring snafu
* Fix up the damlc tests
* Tighten up a test by demanding it throws ExitFailure
* Move the IdeResult term into the A data type
* Nothing ever consults the errors stored in A, so stop storing them
* Use the new Shake MonadFail Rules instance
* Document the information in the Shake database
* More documentation of the data in the Shake service
* Change getValues to avoid getting the diagnostics
* Avoid fmap over a pair, a bit weird
* 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
* 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>
* 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