digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
Other
802 stars 204 forks source link

Scala codegen support for interfaces #13349

Closed S11001001 closed 2 years ago

S11001001 commented 2 years ago

Like #11350, but for Scala codegen. Design https://github.com/digital-asset/daml/issues/13668#issuecomment-1126524659 .

stefanobaghino-da commented 2 years ago

I don't think we should work on this, unless there's a very good reason to do so.

S11001001 commented 2 years ago

I don't think we should work on this, unless there's a very good reason to do so.

I agree; it exists first to determine whether there is a very good reason, so we don't forget to check that.

stefanobaghino-da commented 2 years ago

Prioritizing rationale: this item is a roadblock towards working with interfaces. We need to unblock other teams from implementing tests for interfaces. This is meant as a short-term measure to make use of the team's expertise. I still believe we should have a clear understanding, shared with other teams, regarding the longer-term strategy with regards to the Scala bindings. I'll be very happy to talk more about it with you soon.

S11001001 commented 2 years ago

There are three "levels" of implementation:

  1. What I mentioned at the beginning of https://github.com/digital-asset/daml/issues/13655#issuecomment-1111112666
  2. Equivalent functionality to #11350
  3. The full https://github.com/digital-asset/daml/issues/13668#issuecomment-1106915404 -compatible implementation

From what @remyhaemmerle-da mentioned, there is a good chance that only doing (1) will unblock testing. It only implements the first checkbox item above, and that in a way that creates slightly invalid exercise commands according to (3), but that might be good enough, since you can technically just patch in the correct interface ID on those exercise commands.

If it is not quite good enough, we should probably not just do #11350, instead doing a full #13668-like implementation.

remyhaemmerle-da commented 2 years ago

Thanks Steven. I will let you known if it is enough.