Commit 36b1667
typespec_client_core: New
The `typespec_client_core::sleep::sleep` is using the async_runtime's
sleep implementation, which is complicated to support `wasm32`, and will
panic now when targeting to `wasm32`. Instead of make the
`standard_runtime` to support wasm32 sleep (I wonder if it's feasible),
we can instead just introduce another `sleep` implementation to simply
use the `gloo_timers::future::sleep`.
Also, this PR adds a `cfg_attr` for conditionally remove the `Send`
trait from the `async_trait` for the `RetryPolicy`, as the other parts
of the code do.
Fix #2754
Supersedes: #2770
Co-authored-by: Larry Osterman <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Heath Stewart <[email protected]>web_runtime to support wasm32-unknown-unknown (#2838)1 parent b8f592a commit 36b1667
File tree
14 files changed
+246
-122
lines changed- eng/dict
- sdk/typespec/typespec_client_core
- src
- async_runtime
- http/policies/retry
- time
14 files changed
+246
-122
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
64 | 79 | | |
65 | 80 | | |
66 | 81 | | |
| |||
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
| 94 | + | |
79 | 95 | | |
80 | 96 | | |
81 | 97 | | |
| |||
Lines changed: 45 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 14 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
29 | 25 | | |
30 | | - | |
31 | | - | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
39 | | - | |
| 33 | + | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
| 80 | + | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
| 83 | + | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | | - | |
89 | 87 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
99 | 97 | | |
100 | 98 | | |
101 | | - | |
| 99 | + | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
108 | | - | |
109 | 106 | | |
110 | 107 | | |
111 | | - | |
| 108 | + | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| |||
124 | 121 | | |
125 | 122 | | |
126 | 123 | | |
127 | | - | |
| 124 | + | |
128 | 125 | | |
129 | 126 | | |
130 | 127 | | |
131 | | - | |
132 | 128 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
141 | 137 | | |
142 | | - | |
143 | 138 | | |
144 | 139 | | |
145 | 140 | | |
| |||
155 | 150 | | |
156 | 151 | | |
157 | 152 | | |
158 | | - | |
| 153 | + | |
159 | 154 | | |
160 | 155 | | |
161 | 156 | | |
| |||
190 | 185 | | |
191 | 186 | | |
192 | 187 | | |
193 | | - | |
| 188 | + | |
194 | 189 | | |
195 | | - | |
| 190 | + | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
199 | 194 | | |
200 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
201 | 200 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
0 commit comments