-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optionally allow output world name when importizing (#1806)
Signed-off-by: karthik2804 <[email protected]>
- Loading branch information
1 parent
e5132af
commit 6cea1f3
Showing
11 changed files
with
152 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/// RUN[simple]: component wit --importize-world simple % | ||
/// RUN[simple-rename]: component wit --importize-world simple-rename --importize-out-world-name test-rename % | ||
/// RUN[simple-component]: component embed --dummy --world simple % | / | ||
/// component wit --importize | ||
/// RUN[with-deps]: component wit --importize-world with-deps % | ||
/// RUN[simple-toplevel]: component wit --importize-world simple-toplevel % | ||
/// RUN[toplevel-deps]: component wit --importize-world toplevel-deps % | ||
/// FAIL[fail1]: component wit --importize-world fail1 % | ||
/// RUN[trim-imports]: component wit --importize-world trim-imports % | ||
/// RUN[tricky-import]: component wit --importize-world tricky-import % | ||
package importize:importize; | ||
|
||
interface t { | ||
resource r; | ||
} | ||
|
||
interface bar { | ||
use t.{r}; | ||
|
||
record foo { | ||
x: string, | ||
} | ||
|
||
importize: func(name: r); | ||
} | ||
|
||
interface qux { | ||
use bar.{foo}; | ||
|
||
blah: func(boo: foo); | ||
} | ||
|
||
interface something-else-dep { | ||
type t = u32; | ||
} | ||
|
||
interface a { | ||
} | ||
|
||
interface b { | ||
} | ||
|
||
interface with-dep { | ||
type t = u32; | ||
} | ||
|
||
world simple { | ||
export t; | ||
} | ||
world with-deps { | ||
import t; | ||
import bar; | ||
|
||
export qux; | ||
} | ||
world simple-toplevel { | ||
export foo: func(); | ||
export something: interface { | ||
foo: func(); | ||
} | ||
} | ||
world toplevel-deps { | ||
import something-else-dep; | ||
|
||
type s = u32; | ||
|
||
export bar: func() -> s; | ||
export something-else: interface { | ||
use something-else-dep.{t}; | ||
|
||
bar: func() -> t; | ||
} | ||
} | ||
world fail1 { | ||
type foo = u32; | ||
|
||
export foo: func() -> foo; | ||
} | ||
world trim-imports { | ||
import a; | ||
import foo: func(); | ||
import bar: interface { | ||
} | ||
|
||
type t = u32; | ||
|
||
export b; | ||
} | ||
world tricky-import { | ||
import with-dep; | ||
use with-dep.{t}; | ||
|
||
export f: func() -> t; | ||
} | ||
world test-rename { | ||
import t; | ||
} |
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
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