* Fetch grpc and protobuf Haskell libraries from Hackage
All the changes that resulted in us fetching them from git, have been
included in the latest Hackage releases.
* Switch back to a custom build file for grpc-haskell-core
* Remove grpc-haskell-core from hazel packages
* Add support for on-disk incremental builds in damlc build
* Normalise file paths of internal modules because Windows
* stop stealing my $s hlint
* Apparently jars are also called exe
* Address review comments
* Bump to proper ghcide revision
* Update bazel-common to fix javadoc issues
Specifically, to fix the following error
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
javadoc_library(name = 'rs-grpc-bridge_javadoc')
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```
* Define Maven deps using rules_jvm_external
* Pin artifacts
* Remove bazel-deps generated targets
* Remove bazel-deps
* Switch to rules_jvm_external targets
* update bazel documentation
* pom_file: There are no more bazel-deps targets
* BAZEL-JVM.md `maven_install` typo
* Upgrade ghc-libs
* Convert template instances as type synonyms to DAML-LF
* Look for TEMPLATE_INSTANCE suffix for daml docs
* Update desugaring documentation
* Use a consistant include dir for cwd
See https://github.com/digital-asset/ghcide/pull/114 for the actual
fix.
This PR just bumps ghcide and adds a regression test. I’ll change the
revision before merging, I just want to test CI for now.
fixes#2929
* Switch to proper ghcide revision
* writeIfacesAndHie no longer exists
* Add changelog entry
* Maybe I should try to compile code before committing but I don’t want to
* Fix ghcide exe
* Allow for importig generic templates qualified
Currently, there's a bug which breaks `template instance` declarations when
the module containing the generic template definition is imported qualified.
This PR fixes this problem.
* Update ghc-lib, allowing qualified import of generic templates
* Rename hie-core to ghcide
The name `hie-core` has caused a lot of confusion as to how we relate
to haskell-ide-engine so changing it should hopefully help with that.
I also think that ghcide is still a good name once we hopefully
integrate with haskell-ide-engine more closely.
The name ghcide seems to have a reasonable amount of support on
Twitter https://twitter.com/ndm_haskell/status/1170681262987710464
which is of course the only good way to come up with names.
* Add a readme that points people to the new directory.
* Fix bogus replacements
* Use a proper link
* links are hard
* Use proper names for the DB connection pools.
* Add some trace logging for DB operations.
This does not capture timing of individual statements but
rather the time for "units of work".
For example "lookup contract" doesn't mean only loading
a single row from the contracts table, but also 2 additional
queries for looking up witnesses and divulgences.
This is not a problem, because this is trace level logging
that helps us debug problems and shouldn't be made sense of by
users at this stage.
* Make description a by-name parameter.
This avoids building up the string if trace logging
is not enabled (i.e. most of the time).
We currently use a custom cabal file for ghc-lib that has libffi in
the extra-libraries section so Hazel adds the headers. Forcing GHC to
use the bundled libffi should hopefully remove the need for this hack
which simplifies things.
This switches the creation of the archive in `daml build` from
`zip-archive` to `zip`. This has a few advantages:
1. It gets rid of lazy IO for reading all the interface and source
files. This avoids the high usage of file handles in `daml build`.
2. It seems to be a slight improvement in max memory usage and runtime
and a giant improvement in allocations (but I think the latter
probably comes primarily from the fact that the locations are moved to
the bzip C library). The improvement in max memory usage is less than
I expected so probably there is still something off somewhere.
For now, I only switched over `createArchive`. Archive reading is
still done using `zip-archive`. We might want to switch that over in a
separate PR.
When diagnosing error logging from akka when shutting down the ledger
API server, I wanted to give upgrading akka to the latest good release
between akka and akka-http. Incidentally, this actually removed the
errors and the shutdown should now be successful.
* Extract template instance doc from newtype constructor doc
* Use new ghc-libs
* Remove type application which is not needed anymore
* Update daml-doc output with template instances
* Update hlint version
* Upgrade ghc-libs supporting generic templates
* Update Proposal and ComposedKey tests to generic template syntax
* Temporarily patch daml-doc test output (will need to fix for template instances)
* Starting //ledger-service/jwt module
adding //3rdparty/jvm/com/auth0:java_jwt dependency, there are Scala JWT
libraries, however they are either immature or unsupported
* Keys and JWT generator utility/wrapper, WIP
* Keys and JWT generator utility/wrapper, WIP
* RSA Keys generator
* HMAC token validation added to command/create endpoint
HMAC is actually not good, need RSA, this is a shortcut for DABL team.
* Renaming
* command/create test cases fixed to pass OAth2 Bearer token
* removing unused method
* JWT authorization for /command/exercise
* the rest of the endpoints uses JWT authorization
removed hardcoded JwtPayload
* cleanup
* cleanup
* http status code in the header and in the json body should match now
* NotFound would also return a json body now
* Removing hardcoded JWT in the integration test
it is generated using the JwtSigner.HMAC256
* cleanup
* fixing error message
* instructions for making a JWT HMAC token for dev
* Update ghc-libs to use new template desugaring
* Replace old template typeclasses with generic-friendly ones
* New template desugaring doc
* Fix tests
* Fix damldoc tests regarding Archive choice
* Update visualisation code to not traverse master dictionary
* Additional class method stubs to template instance declaration for upgrades
* Increase stack limit for bond trading compilation test
* Update hlint version
* Upgrade ghc-lib
* Patch bazel_tools : hazel-include-paths patch, no-isystem patch.
* Provide "haskell_c2hs" for package name to cabal_haskell_package
* Package name haskell_c2hs => c2hs.
* Switch to less hacky patch for include dirs
* 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
* Add RemoteApiProxy fixture type.
This is in preparation for using Sandbox IT suite as part of the Ledger API Test
Tool.
* ledger-api-test-tool: Drop reset functionality.
This is no longer necessary for the tool and it does not scale with the types of
tests in the suite.
* integration-tests: Fail if the server under fixture is stuck.
This makes sure that a server getting stuck will get detected by a test, instead
of ignoring it and potentially allowing the server to linger.
* integration-test: Make semantic testing runs independent.
It manges parties and command identifier to include a unique (random) suffix in
all ledger-commited identifiers. This allows the test to run against a Ledger
API without reseting it.
* ledger-api-test-tool: Unify test code using scenario runner with IT suite.
This reuses the scenario runner test code from the IT suite, instead of
reimplementing it. This should be a no-op (except for tests reports formatting).
* Review fixes.
* Ledger API Test Tool: Provide logback config.
This quites Ledger API Test Tool output.
* Make sure akka threads are terminated at end of test runs.
This makrs Akka threads to be daemons, hence forcing them to be closed at the
end of Ledger Api Test Tool.
* Use Ledger API Test Tool in tests of reference server.
* Add Apache commons-lang3.
* Ledger API Test Tool: Implement custom test reporter.
This addresses two needs:
- avoid using buggy scalatest test reporter;
- pretty-prints test results prettier.
* dade-copyright-headers: return success on successful reformatting.
* force replacement of old test-interface
* java rather than scala for replacement
* back to prior
* backup manual changes to BUILD file
* update bazel deps for test-interface replacement
* thirdparty rather than external target for test-interface
* thirdparty rather than external target for test-interface
* Update rules_haskell
- rules_haskell now handles the global package db within Bazel
https://github.com/tweag/rules_haskell/pull/859
- We no longer use the Nix provided c2hs. So, we drop it.
- Rename `ghcWithC2hs` to `ghcStatic` to clarify that that's where the
static linking patches are applied.
- Extend package-db patches to align Nix store paths with the new $out.
This works around a restriction in current rules_haskell, where
the paths in the package config files must have the same prefix as
the path to the package config files themselves.
- Don't exclude haskell libraries from extra-libraries entries.
* Drop redundant unix-compat override
This is a left-over from when the package was patched.
* Windows GHC bindist includes ffi header
* Drop unused language-c Nix override
* Hazel: Shorten target names
Previously, Hazel would generate library and binary targets, that
repeated the package name in their target name. This easily lead to too
long paths on Windows, which could induce errors with code that did not
use API functions with long path support.
This change modifies Hazel to name the library target "lib" and shorten
the binary target names to "bin" or just the Cabal exe component name.
This change had further reaching consequences, because the package name
in the generated version macros was derived from the library target
name. rules_haskell has been extended to allow to override that default
behaviour.
* data-default: Remove custom build definitions
These had been introduced to resolve issues on Windows due to too long
target names. Hazel has meanwhile been patched to generate such shorter
target names by default, making the custom builds superfluous.
* Hazel: unshorten cbits name
This is a temporary workaround for otherwise clashing cbits library
names in the case of static only linking.
This PR copies the hack that I used for the other
data-default-instances-* packages to data-default-instances-dlist. The
exact conditions under which this seems to be required probably depend
on things like your username and the directory of your project which
is why this failed for Neil but not for me.