- Add tests that serialize custom and component resources for targets
that support resource references
- Add tests that serialize custom and component resources for downlevel
targets
- Add tests that deserialize known custom and component resources
- Add tests that deserialize missing custom and component resources
These changes also fix a few bugs that were encountered during testing:
- Component resource construction was not supported
- Resources with missing packages could not be deserialized
In the latter case, a missing resource is deserialized as a generic
DependencyResource.
These changes also update the signature of IMocks.NewResourceAsync to
allow the returned ID to be null. This is technically a C# breaking change
with respect to nullability.
Contributes to #5943.
Co-authored-by: Mikhail Shilkov <github@mikhail.io>
Resources are serialized as their URN, ID, and package version. Each
Pulumi package is expected to register itself with the SDK. The package
will be invoked to construct appropriate instances of rehydrated
resources. Packages are distinguished by their name and their version.
This is the foundation of cross-process resources.
Related to #2430.
Co-authored-by: Mikhail Shilkov <github@mikhail.io>
Co-authored-by: Luke Hoban <luke@pulumi.com>
Co-authored-by: Levi Blackstone <levi@pulumi.com>