mirror of https://github.com/pulumi/pulumi.git
36cbf572f4
These changes extend the public API of `pkg/codegen/schema` to support on-demand binding of package members. On-demand binding is appropriate for scenarios that do not require the entire package, especially those such as program code generation or the YAML LSP server that require only specific types/functions/etc. The extensions to the public API consist of two new types and several new methods. The most notable of these are `PackageReference` and `Loader.LoadPackageReference`. The former provides the on-demand binding interface, while the latter creates instances of the former (n.b. it was my intent to make a breaking change to the signature of `Loader.LoadPackage` s.t. it returns a `PackageReference`, but the circular dependency between this Go module and those for YAML and Java prevented that change). These changes _dramatically_ reduce the memory required to interace with Pulumi Packages, and only require memory proportional to the number of accessed package members. We may be able to improve on this in the future by removing type/resource/function interning, which would allow those values to be garbage collected at a granaular level rather than at a package level. That is a more radical change, though, as it requires new equality semantics for each of the affected types (some of which are currently used as map keys). |
||
---|---|---|
.. | ||
bad-enum-1.json | ||
bad-enum-2.json | ||
bad-enum-3.json | ||
bad-enum-4.json | ||
bad-methods-1.json | ||
bad-methods-2.json | ||
bad-methods-3.json | ||
bad-methods-4.json | ||
bad-methods-5.json | ||
bad-methods-6.json | ||
good-enum-1.json | ||
good-enum-2.json | ||
good-enum-3.json | ||
good-enum-4.json | ||
good-methods-1.json | ||
overlay.json | ||
replace-on-changes-1.json | ||
replace-on-changes-2.json | ||
replace-on-changes-3.json | ||
replace-on-changes-4.json | ||
replace-on-changes-5.json | ||
replace-on-changes-6.json |