Open cocreature opened 3 years ago
Why not just use a Sandbox version that exposes the right Ledger API version? Ie split platform-version
into connect-version
which selects JSON API and trigger versions, and ledger-api-version
which selects language, compiler, and sandbox versions.
Why not just use a Sandbox version that exposes the right Ledger API version? Ie split
platform-version
intoconnect-version
which selects JSON API and trigger versions, andledger-api-version
which selects language, compiler, and sandbox versions.
Because there are other improvements in newer implementations. Performance, bugfixes, better errors, …. Selecting an inferior (assuming we improve our software over time) implementation of the same API just to make sure I don’t accidentally depend on the wrong API is kind of crappy.
You also pay for two SDK downloads and installations in that case.
Because there are other improvements in newer implementations. Performance, bugfixes, better errors, …. Selecting an inferior (assuming we improve our software over time) implementation of the same API just to make sure I don’t accidentally depend on the wrong API is kind of crappy.
I don't really buy this. The Sandbox is 95% the integration kit. Ie a. Sandbox which exposes Ledger API version X will behave like a ledger that exposes Ledger API version X in most of the respects you list: Performance, bugfixes, better errors. So I think "Use the latest Sandbox that exposes the given API version" does make sense.
My worry is primarily that uses use unsupported features on the client side. Like you said, multi-party submission via ledger-bindings is a good example. I would like a least a way to be warned that I'm doing so.
Fair enough, I think there is still value in getting better errors during development even if I can’t get them in my live ledger but that can definitely also be confusing. I don’t feel too strongly about this so fine to go with your proposal. I’ve updated the text.
As for connect-version
, this seems a bit confusing once we have a canon-based sandbox.
I think we could spew out a warning if you start the Canton Sandbox in a project which has ledger-api-version
set. It makes no sense since the Connect Node and thus Ledger API version move into app-space.
We are currently looking at adding a general flag for dev version across the stack, this work is related.
Problem
Currently, your only option to target a specific ledger API version (which includes the LF version) is to add a
--target
flag in thebuild-options
section of yourdaml.yaml
. This works but it has some shortcomings:Proposed changes
ledger-api-version
field todaml.yaml
.damlc
will pick up this field and chose the target LF version as the newest stable (but possibly not default) LF version compatible with that Ledger API version. If the field is not present, behavior is as it is now.Implementation
Other tools can follow later.