mirror of https://github.com/pulumi/pulumi.git
2c0266c9e4
This change rearranges the old way we dealt with URLs. In the old system, virtually every reference to an element, including types, was fully qualified with a possible URL-like reference. (The old pkg/tokens/Ref type.) In the new model, only dependency references are URL-like. All maps and references within the MuPack/MuIL format are token and name based, using the new pkg/tokens/Token and pkg/tokens/Name family of related types. As such, this change renames Ref to PackageURLString, and RefParts to PackageURL. (The convenient name is given to the thing with "more" structure, since we prefer to deal with structured types and not strings.) It moves out of the pkg/tokens package and into pkg/pack, since it is exclusively there to support package resolution. Similarly, the Version, VersionSpec, and related types move out of pkg/tokens and into pkg/pack. This change cleans up the various binder, package, and workspace logic. Most of these changes are a natural fallout of this overall restructuring, although in a few places we remained sloppy about the difference between Token, Name, and URL. Now the type system supports these distinctions and forces us to be more methodical about any conversions that take place. |
||
---|---|---|
.. | ||
package.go | ||
package_url.go | ||
package_url_test.go | ||
version.go | ||
version_test.go |