Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Non-canonical identifiers in imports #109

Open
guybedford opened this issue Mar 9, 2023 · 3 comments
Open

Non-canonical identifiers in imports #109

guybedford opened this issue Mar 9, 2023 · 3 comments
Assignees

Comments

@guybedford
Copy link

guybedford commented Mar 9, 2023

The new WASI reactor definition is now:

default world reactor {
  import wall-clock: clocks.wall-clock
  import monotonic-clock: clocks.monotonic-clock
  ...
}

That is, from a WIT perspective, the identifying import name is the unique string "wall-clock". Without having any wasi reference in this unique string, there is no blanket way to disambiguate this now from other types of world imports which are non-wasi.

I'd really appreciate some direction here for the JS translation process since it's not clear how to handle this now.

@guybedford
Copy link
Author

Is the plan to have something like:

default world reactor {
  import wall-clock: clocks.wall-clock as "wasi:wall-clock"
  import monotonic-clock: clocks.monotonic-clock as "wasi:monotonic-lock"
  ...
}

or something other mechanism to bring in the URL identifier as distinct?

@eduardomourar
Copy link
Collaborator

I believe this is related to: WebAssembly/component-model#177.

@sunfishcode
Copy link
Member

Yes; see also WebAssembly/component-model#169 which is about unioning worlds and renaming things when there are name conflicts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants