Decomposing the DAML assistant for better Bazel integration
Hi,
following up on Managing package dependencies with Bazel - #6 by cocreature
maybe even go lower-level and construct them manually
can somebody please point me at anything that is out there that would help me directly invoke the tools underlying the DAML Assistant? I am expecting to be able to create faster and more robust Bazel builds when bypassing the DAML Assistant.
Regards,
Alex
I depends which tools you are trying to use. Some commands like daml ledger are part of the assistant. There is no way to circumvent it. The Daml compiler is a binary you can find in your install directory (eg ~/.daml/sdk/1.10.0/damlc/damlc). All the JVM-based tools like Sandbox, JSON API, Navigator, etc are bundled into a single JAR file. You can start them with commands of the kind
java -jar ~/.daml/sdk/1.10.0/daml-sdk/daml-sdk.jar sandbox
However, note that these are undocumented internal APIs. We don’t guarantee backward-compatibility for these. So for that kind of tooling, you are better off in my opinion to use stand-alone equivalents. Ie replace Sandbox with Daml for PostgreSQL and use the standalone JSON API JAR file from GitHub releases.
Thanks, Bernhard.
It is actually not clear to me yet where I intend to take this. I am just looking into ways on how to make my BAZEL based build faster. For example, daml test seems to rebuild the .dar file, instead of using the one that a previous daml build has just produced. I suspect it is things like these that make the build slow. But I need to investigate further before I can say with more certainty.
Regards,
Alex