Commit 4611d5c
feat: add error impl for streams (#4)
* feat: add error impl for stream/future closure
This commit adds the implementation for error propagation during
stream/future closure.
When streams are closed on write, they have the option to send an
error context that should be seen by the reader on the next read.
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* refactor: facilitate host read returning error context
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* fix: pass error context type for component through
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* fix: pass through error context type in more places
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* chore: improve invalid handle error messages
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* wip: clarify comments around global error context management
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* wip: finish up edge cases
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* chore: remove irrelevant comment
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* fix: remove unneeded ref translation
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* fix: remove unused err_ctx_ty
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
* fix: comment regarding writer and error context
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
* fix: remove unused err_ctx_ty future/stream/flat_stream write
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
---------
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
Co-authored-by: Joel Dice <joel.dice@fermyon.com>1 parent d1596df commit 4611d5c
File tree
6 files changed
+519
-152
lines changed- crates
- cranelift/src/compiler
- environ/src/component
- translate
- wasmtime/src/runtime
- component/concurrent
- vm
6 files changed
+519
-152
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | | - | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
165 | | - | |
| 169 | + | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
| |||
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | | - | |
| 188 | + | |
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
200 | 205 | | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
206 | 211 | | |
207 | | - | |
208 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
209 | 218 | | |
210 | 219 | | |
211 | 220 | | |
| |||
215 | 224 | | |
216 | 225 | | |
217 | 226 | | |
218 | | - | |
| 227 | + | |
219 | 228 | | |
220 | 229 | | |
221 | 230 | | |
| |||
231 | 240 | | |
232 | 241 | | |
233 | 242 | | |
234 | | - | |
| 243 | + | |
235 | 244 | | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
250 | 260 | | |
251 | 261 | | |
252 | 262 | | |
| |||
1109 | 1119 | | |
1110 | 1120 | | |
1111 | 1121 | | |
1112 | | - | |
| 1122 | + | |
1113 | 1123 | | |
1114 | 1124 | | |
1115 | 1125 | | |
| |||
1165 | 1175 | | |
1166 | 1176 | | |
1167 | 1177 | | |
1168 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1169 | 1182 | | |
1170 | 1183 | | |
1171 | 1184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| |||
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| 338 | + | |
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
| |||
352 | 355 | | |
353 | 356 | | |
354 | 357 | | |
| 358 | + | |
355 | 359 | | |
356 | 360 | | |
357 | 361 | | |
| |||
789 | 793 | | |
790 | 794 | | |
791 | 795 | | |
792 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
793 | 801 | | |
| 802 | + | |
794 | 803 | | |
795 | 804 | | |
796 | 805 | | |
| |||
808 | 817 | | |
809 | 818 | | |
810 | 819 | | |
811 | | - | |
812 | | - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
813 | 825 | | |
814 | 826 | | |
815 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
816 | 832 | | |
| 833 | + | |
817 | 834 | | |
818 | 835 | | |
819 | 836 | | |
| |||
831 | 848 | | |
832 | 849 | | |
833 | 850 | | |
834 | | - | |
835 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
836 | 856 | | |
837 | 857 | | |
838 | 858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
741 | 745 | | |
742 | 746 | | |
743 | 747 | | |
| |||
784 | 788 | | |
785 | 789 | | |
786 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
787 | 794 | | |
788 | 795 | | |
789 | 796 | | |
| |||
797 | 804 | | |
798 | 805 | | |
799 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
800 | 811 | | |
801 | 812 | | |
802 | 813 | | |
| |||
843 | 854 | | |
844 | 855 | | |
845 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
846 | 860 | | |
847 | 861 | | |
848 | 862 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| 757 | + | |
757 | 758 | | |
758 | 759 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
763 | 768 | | |
764 | 769 | | |
765 | 770 | | |
| |||
824 | 829 | | |
825 | 830 | | |
826 | 831 | | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
831 | 837 | | |
832 | 838 | | |
833 | 839 | | |
| |||
848 | 854 | | |
849 | 855 | | |
850 | 856 | | |
| 857 | + | |
851 | 858 | | |
852 | 859 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
857 | 868 | | |
858 | 869 | | |
859 | 870 | | |
| |||
918 | 929 | | |
919 | 930 | | |
920 | 931 | | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
925 | 937 | | |
926 | 938 | | |
927 | 939 | | |
| |||
0 commit comments