Issue when attempting to encrypt union fields with AshCloak

I get an error during compilation when attempting to encrypt a union field with AshCloak. I have a minimal example here. https://github.com/evhinesdev/ash-union-cloak-problem-example/tree/main This was generated from the ash-hq.com generator with the Example.Test resource added. Is this an issue with how I am using the extension or are unions not valid targets of AshCloak?
GitHub
GitHub - evhinesdev/ash-union-cloak-problem-example
Contribute to evhinesdev/ash-union-cloak-problem-example development by creating an account on GitHub.
2 Replies
evhinesdev
evhinesdevOP4mo ago
Maybe this is just an issue with tagged unions and AshCloak since the tag is encrypted before it is needed? Just a guess but removing the cloak definition immediately fixes the compile.
ZachDaniel
ZachDaniel4mo ago
Would you mind opening an issue and sharing the error that you're getting there? It sounds like a bug but hard to say and I don't have time to run the project at the moment. Should ahve time to look at it early this week though. on ash_cloak

Did you find this page helpful?