Debian Codegraph @

tests/cli/merge-with-similar-versions.wit

raw
1 // RUN[imports]: component wit % --merge-world-imports-based-on-semver imports
2 // RUN[exports]: component wit % --merge-world-imports-based-on-semver exports
3 // RUN[imports-deps]: component wit % --merge-world-imports-based-on-semver imports-deps
4 // RUN[imports-deps2]: component wit % --merge-world-imports-based-on-semver imports-deps2
5 // FAIL[invalid-semver]: component wit % --merge-world-imports-based-on-semver invalid-semver
6 // RUN[valid-semver]: component wit % --merge-world-imports-based-on-semver valid-semver
7 // RUN[fix-transitive]: component wit % --merge-world-imports-based-on-semver fix-transitive
8
9 package foo:bar;
10
11 world imports {
12 import a:b/[email protected];
13 import a:b/[email protected];
14 }
15
16 world exports {
17 export a:b/[email protected];
18 export a:b/[email protected];
19 }
20
21 world imports-deps {
22 import a:b/[email protected];
23 import a:b/[email protected];
24 }
25 world imports-deps2 {
26 import a:b/[email protected];
27 import a:b/[email protected];
28 }
29
30 world invalid-semver {
31 import a:b/[email protected];
32 import a:b/[email protected];
33 }
34
35 world valid-semver {
36 import a:b/[email protected];
37 import a:b/[email protected];
38 }
39
40 world fix-transitive {
41 import a:b/[email protected];
42 use a:b/[email protected].{t as t1};
43 use a:b/[email protected].{t as t2};
44
45 import a:b/[email protected];
46 use a:b/[email protected].{t as t3};
47 use a:b/[email protected].{t as t4};
48 }
49
50 package a:[email protected] {
51 interface foo {
52 type t = u32;
53 x: func();
54 }
55
56 interface depend-on-foo {
57 use foo.{t};
58 x: func() -> t;
59 }
60
61 interface invalid-semver {
62 x: func();
63 }
64
65 interface valid-semver {
66 x: func();
67 }
68
69 interface use-foo1 {
70 use foo.{t};
71 x: func() -> t;
72 }
73 }
74
75 package a:[email protected] {
76 interface foo {
77 type t = u32;
78 x: func();
79 }
80
81 interface depend-on-foo {
82 use foo.{t};
83 x: func() -> t;
84 }
85
86 interface invalid-semver {
87 y: func();
88 }
89
90 interface valid-semver {
91 x: func();
92 y: func();
93 }
94
95 interface use-foo2 {
96 use foo.{t};
97 x: func() -> t;
98 }
99 }