Replies: 4 comments 2 replies
-
Great to see this being brought up! Regarding the question about what's in the published component binary: With the component format changes in component-model/#198, the names of interface imports and exports will have the form Note that, when a component containing aliases is published, the publish event can record precisely the state of the registry (and all aliased registries) as observed by the developer at the time publication. Thus, there should be zero loss of information or addition of ambiguity with having the published contents of a component use aliases. And then if a downstream use of this published component wants to map the alias to something else (for which I think there are a number of use cases, local development being one), the downstream doesn't need to rewrite the binary (thereby changing the content hash) or map from one domain to another (making the domain an alias after all, which seems likely to trip up anyone along the way who thinks domains are domains). There is a time and place for domains, of course, but I think it's when you ship a component to a browser that is going to live-fetch the component's imports and in this case the domain isn't that of the registry, it's that of a CDN or production server. |
Beta Was this translation helpful? Give feedback.
-
I haven't thought about it like this. To me, If I, a client, ask a registry for Thus, I consider this more of a problem to solve for how a registry maps namespaces in the context of replication/redirecting.
I think we'd have the
I don't think it'd be a concern for local development at all. The developer simply configures their tooling regarding which registries it wants to source packages from. It could be a single registry for every package or particular registries for specific packages. Take for example a hypothetical Fastly registry one day. The Fastly developer SDKs would be configured to use a hypothetical registry at
This sound more of what I was thinking. The registry would maintain a set of namespaces or full package names it is either redirecting to or fully replicating the logs for. I think that'd be under the purview of the registry's implementation to determine at what scope it does the mapping. |
Beta Was this translation helpful? Give feedback.
-
Does this reflect how you guys are thinking about it? Namespaces are some valid name ending with When a Registry is setup to mirror another Registry, an alias namespace is declared as a prefix for the mirrored package names. That alias namespace would map to the mirrored Registry's domain name. For the moment, let's call this a "Namespace Import Map". The "Namespace Import Map" would also need to be mirrored (recursively) to resolve mirrored package imports. Can a namespace be deleted or renamed? Probably not. |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion since it is outdated and could cause confusion. But happy to reopen if others feel otherwise. |
Beta Was this translation helpful? Give feedback.
-
Primarily, two use cases:
wasi:
mapping toregistry.wasi.dev:
orba:
mapping toregistry.bytecodealliance.org:
;There are a few different ways to implement. Key questions:
Beta Was this translation helpful? Give feedback.
All reactions