Debian Codegraph @

tests/cli/importize.wit.tricky-import.stdout

raw
1 /// RUN[simple]: component wit --importize-world simple %
2 /// RUN[simple-rename]: component wit --importize-world simple-rename --importize-out-world-name test-rename %
3 /// RUN[simple-component]: component embed --dummy --world simple % | /
4 /// component wit --importize
5 /// RUN[with-deps]: component wit --importize-world with-deps %
6 /// RUN[simple-toplevel]: component wit --importize-world simple-toplevel %
7 /// RUN[toplevel-deps]: component wit --importize-world toplevel-deps %
8 /// FAIL[fail1]: component wit --importize-world fail1 %
9 /// RUN[trim-imports]: component wit --importize-world trim-imports %
10 /// RUN[tricky-import]: component wit --importize-world tricky-import %
11 package importize:importize;
12
13 interface t {
14 resource r;
15 }
16
17 interface bar {
18 use t.{r};
19
20 record foo {
21 x: string,
22 }
23
24 importize: func(name: r);
25 }
26
27 interface qux {
28 use bar.{foo};
29
30 blah: func(boo: foo);
31 }
32
33 interface something-else-dep {
34 type t = u32;
35 }
36
37 interface a {
38 }
39
40 interface b {
41 }
42
43 interface with-dep {
44 type t = u32;
45 }
46
47 world simple {
48 export t;
49 }
50 world simple-rename {
51 export t;
52 }
53 world with-deps {
54 import t;
55 import bar;
56
57 export qux;
58 }
59 world simple-toplevel {
60 export foo: func();
61 export something: interface {
62 foo: func();
63 }
64 }
65 world toplevel-deps {
66 import something-else-dep;
67
68 type s = u32;
69
70 export bar: func() -> s;
71 export something-else: interface {
72 use something-else-dep.{t};
73
74 bar: func() -> t;
75 }
76 }
77 world fail1 {
78 type foo = u32;
79
80 export foo: func() -> foo;
81 }
82 world trim-imports {
83 import a;
84 import bar: interface {
85 }
86
87 type t = u32;
88 import foo: func();
89
90 export b;
91 }
92 world tricky-import-importized {
93 import with-dep;
94 use with-dep.{t};
95 import f: func() -> t;
96 }