Skip to content

Commit 85c0d9f

Browse files
committed
Add comment about WIT topological sort
1 parent 7b4d8c5 commit 85c0d9f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

design/mvp/WIT.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,11 @@ interface my-host-functions {
446446
```
447447

448448
Here the `types` interface is not defined in `host.wit` but lookup will find it
449-
as it's defined in the same package, just instead in a different file.
449+
as it's defined in the same package, just instead in a different file. Since
450+
files are not ordered, but type definitions in the Component Model are ordered
451+
and acyclic, the WIT parser will perform an implicit topological sort of all
452+
parsed WIT definitions to find an acyclic definition order (or produce an error
453+
if there is none).
450454

451455
When importing or exporting an [interface][interfaces] in a [world][worlds]
452456
the same syntax is used in `import` and `export` directives:

0 commit comments

Comments
 (0)