Is there a reason why TemplateTypeRep is not serializable?

I get that upgrading becomes difficult, but are there are technical blockers preventing it

Hello @gtpaulose2

The short answer is that there are no technical blockers preventing us from making Typerep serializable, but there are some practical challenges and trade-offs that makes it a low priority for us at the moment.

The main challenge is that making Typerep serializable would require a lot of work and coordination across different components of the Daml ecosystem, such as the ledger API, language bindings, and the various client applications that we provide. This would entail a significant amount of development, testing and maintenance effort.

The main trade-off is that the Typerep was added to the language for Daml script – where it is an essential feature – but was not meant for normal Daml. Currently, the use cases of serializable Typerep we have identified are not compelling enough to outweigh the other features prioritized on our roadmap.

Another factor is that we are working on a new feature that will enable more flexible and powerful upgrade mechanisms for Daml contracts. This feature will interact with Typerep in some ways that are still not completely clear to us. Therefore, in order to minimize possible breaking changes, it is clear we will not make Typerep serializable before a first version of this feature has landed.