Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and define WIT IDs that are referenced elsewhere #298

Closed
wants to merge 1 commit into from

Conversation

ggoodman
Copy link

As a newcomer coming to the Component Model, I was struggling to understand what a ID meant in the context of a WIT file. To help myself and others following in my footsteps, I took a stab at writing down what I thought I understood.

I don't expect this to be correct but hope we can use it as the starting point to get a solid definition in the reference doc.

Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for taking the time to suggest improvements here! One thing to note is that there are already several sections that discuss identifiers ("Package identifiers", "WIT identifiers" and "Identifiers"; I wonder if the latter two could be collapsed...). Thus, we probably don't want to add a new section but rather augment an existing one.


For example, the `wasi:[email protected]` world imports the `wall-clock` interface
which has a `now: func() -> datetime` method. The ID for this method would be
`wasi:[email protected]/wall-clock/now`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, the version string is specified to go at the end, so it'd be wasi:clock/[email protected].

@ggoodman
Copy link
Author

ggoodman commented Feb 1, 2024

Hi @lukewagner thanks for taking a look. The perceived gap in the document was understanding how deduplication happens. My understanding was that the deduplication happened on an ID basis. In the WIT Worlds section, we start referencing 'IDs' but I couldn't find any clear reference of what these IDs point to and what their components are. I may simply not have read attentively enough. I thought it would be helpful to have a little glossary-like section explaining the concept before it started getting used.

@lukewagner
Copy link
Member

Yes, that makes sense and again I appreciate the work to improve the docs. Perhaps you could update the PR to add the new information to one of the existing sections (and add links to those sections where you think they're missing)?

@lukewagner
Copy link
Member

I think #339 improves the situation for WIT identifiers, so I'll close this PR, but feel free to reopen if there's further changes you'd like to make.

@lukewagner lukewagner closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants