-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wit-encoder: Implement world uses and sort interface and world items,…
… uses (#1910) * wit-encoder: implement world uses and sort interface and world items, uses * update round trip test
- Loading branch information
Showing
4 changed files
with
156 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,11 @@ const MAIN_PACKAGE_SOURCE: &str = indoc::indoc! {" | |
use foo:dep-a/dep-a-interface-b.{ ra }; | ||
} | ||
interface main-interface-b {} | ||
interface main-interface-b { | ||
record mb { | ||
x: f32, | ||
} | ||
} | ||
interface main-interface-c {} | ||
|
@@ -19,14 +23,17 @@ const MAIN_PACKAGE_SOURCE: &str = indoc::indoc! {" | |
interface main-interface-e {} | ||
world main-world-a { | ||
use foo:dep-c/dep-c-interface-b.{ cb, cb as cbcb }; | ||
import foo:dep-c/dep-c-interface-a; | ||
export foo:dep-c/dep-c-interface-b; | ||
include foo:dep-c/dep-c-world-a; | ||
use foo:dep-b/[email protected].{ bb, bb as bbbb }; | ||
import foo:dep-b/[email protected]; | ||
export foo:dep-b/[email protected]; | ||
include foo:dep-b/[email protected]; | ||
use main-interface-b.{ mb, mb as mbmb }; | ||
import main-interface-b; | ||
export main-interface-a; | ||
include main-world-b; | ||
|
@@ -45,7 +52,11 @@ const MAIN_PACKAGE_RESOLVED_ENCODED: &str = indoc::indoc! {" | |
use foo:dep-a/dep-a-interface-b.{ ra }; | ||
} | ||
interface main-interface-b {} | ||
interface main-interface-b { | ||
record mb { | ||
x: f32, | ||
} | ||
} | ||
interface main-interface-c {} | ||
|
@@ -59,16 +70,21 @@ const MAIN_PACKAGE_RESOLVED_ENCODED: &str = indoc::indoc! {" | |
} | ||
world main-world-a { | ||
import foo:dep-c/dep-c-interface-a; | ||
use foo:dep-b/[email protected].{ bb, bb as bbbb }; | ||
use foo:dep-c/dep-c-interface-b.{ cb, cb as cbcb }; | ||
use main-interface-b.{ mb, mb as mbmb }; | ||
import foo:dep-a/dep-a-interface-b; | ||
import foo:dep-b/[email protected]; | ||
import main-interface-b; | ||
import foo:dep-b/[email protected]; | ||
import foo:dep-c/dep-c-interface-a; | ||
import foo:dep-c/dep-c-interface-b; | ||
import foo:dep-c/dep-c-interface-c; | ||
import main-interface-b; | ||
import main-interface-d; | ||
import foo:dep-a/dep-a-interface-b; | ||
export foo:dep-c/dep-c-interface-b; | ||
export foo:dep-b/[email protected]; | ||
export main-interface-a; | ||
export foo:dep-c/dep-c-interface-b; | ||
export foo:dep-c/dep-c-interface-d; | ||
export main-interface-a; | ||
export main-interface-d; | ||
} | ||
"}; | ||
|
@@ -96,6 +112,10 @@ const DEP_PACKAGE_B: &str = indoc::indoc! {" | |
interface dep-b-interface-b { | ||
use foo:dep-c/dep-c-interface-a.{a}; | ||
record bb { | ||
x: f32, | ||
} | ||
} | ||
world dep-b-world-a { | ||
|
@@ -115,7 +135,11 @@ const DEP_PACKAGE_C: &str = indoc::indoc! {" | |
} | ||
} | ||
interface dep-c-interface-b {} | ||
interface dep-c-interface-b { | ||
record cb { | ||
x: f32, | ||
} | ||
} | ||
interface dep-c-interface-c {} | ||
|
Oops, something went wrong.