Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Can I use not exported data types from data-dependencies?Forum ↗

Can I use not exported data types from data-dependencies?

App Development3 posts200 views1 likesLast activity May 2023
GY
gyorgybalazsiOP
May 2023

My use case is that I want to create a migration package which imports templates and other data types from the old and new package.

It seems to me that even if I use the old and new package as data-dependencies for the migration package, I cannot import into the migration package those data types which are not exported in the old and new packages.

Is this the case, or I am doing something wrong?

CO
cocreature
May 2023

I would generally recommend against restricting exports in Daml since it can lead to a false sense of security. The expressions may not be exported in Daml but they are still exported in Daml-LF so you cannot rely on only the exported definitions being available.

That said, for data-dependencies that restriction shouldn’t apply (it goes through daml-lf so it inherits the behavior there). Do you have an example where you are unable to import a type?

GY
gyorgybalazsi
May 2023

Thank you, Moritz, you are right, there was some other problem.

← Back to Discussions