From b8a27208c1b501f3490b71ed6755c0480ca94157 Mon Sep 17 00:00:00 2001
From: Pat Hickey
Date: Fri, 10 Nov 2023 16:19:29 -0800
Subject: [PATCH] Revert " set wasi:sockets package version to
0.2.0-rc-2023-11-10"
---
imports.md | 82 ++++++++++++++++++-----------------------
wit/deps.lock | 4 +-
wit/deps/io/error.wit | 34 -----------------
wit/deps/io/poll.wit | 2 +-
wit/deps/io/streams.wit | 23 +++++++++++-
wit/deps/io/world.wit | 2 +-
wit/ip-name-lookup.wit | 2 +-
wit/tcp.wit | 4 +-
wit/udp.wit | 2 +-
wit/world.wit | 2 +-
10 files changed, 66 insertions(+), 91 deletions(-)
delete mode 100644 wit/deps/io/error.wit
diff --git a/imports.md b/imports.md
index 3f35ee1..7555963 100644
--- a/imports.md
+++ b/imports.md
@@ -2,20 +2,19 @@
-
+
Types
@@ -226,7 +225,7 @@ combined with a couple of errors that are always possible:
ipv4
: ipv4-socket-address
ipv6
: ipv6-socket-address
-
+
This interface provides a value-export of the default network handle..
Types
@@ -241,7 +240,7 @@ combined with a couple of errors that are always possible:
-
+
A poll API intended to let users wait for I/O events on multiple handles
at once.
@@ -291,7 +290,7 @@ being reaedy for I/O.
-
+
Types
@@ -653,7 +652,7 @@ It's planned to be removed when future
is natively supported in Pre
-
+
Types
@@ -698,41 +697,18 @@ the socket is effectively an in-memory configuration object, unable to communica
-
-
-Types
-
-
-Functions
-
-Returns a string that is suitable to assist humans in debugging
-this error.
-WARNING: The returned string should not be consumed mechanically!
-It may change across platforms, hosts, or other implementation
-details. Parsing this string is a major platform-compatibility
-hazard.
-Params
-
-Return values
-
-
+
WASI I/O is an I/O abstraction API which is currently focused on providing
stream types.
In the future, the component model is expected to add built-in stream types;
when it does, they are expected to subsume this API.
Types
-
-error
-
-#### `type pollable`
-[`pollable`](#pollable)
+
+pollable
-#### `variant stream-error`
+#### `resource error`
+
An error for input-stream and output-stream operations.
Variant Cases
@@ -752,6 +728,20 @@ future operations.
Functions
+
+Returns a string that's suitable to assist humans in debugging this
+error.
+The returned string will change across platforms and hosts which
+means that parsing it, for example, would be a
+platform-compatibility hazard.
+Params
+
+Return values
+
Perform a non-blocking read from the stream.
This function returns a list of bytes containing the read data,
@@ -1022,7 +1012,7 @@ is ready for reading, before performing the splice
.
-
+
Types
@@ -1502,7 +1492,7 @@ operations on the output-stream
associ
-
+
Types
@@ -1547,7 +1537,7 @@ is called, the socket is effectively an in-memory configuration object, unable t
-
+
Types
diff --git a/wit/deps.lock b/wit/deps.lock
index 48ee47f..472b87f 100644
--- a/wit/deps.lock
+++ b/wit/deps.lock
@@ -1,4 +1,4 @@
[io]
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
-sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4"
-sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5"
+sha256 = "fb76f4449eea54d06b56fc6a7ca988da51bd84a54d2021cf18da67b5e2c7ebcf"
+sha512 = "c005e2a91522958a9537827a49ae344e1cb39d66e85492901a86bcc7e322ba8d0a7f1a02c9b9f840c123b4ad97e297355fac98d4822536d1426d1096dd1d73ac"
diff --git a/wit/deps/io/error.wit b/wit/deps/io/error.wit
deleted file mode 100644
index 31918ac..0000000
--- a/wit/deps/io/error.wit
+++ /dev/null
@@ -1,34 +0,0 @@
-package wasi:io@0.2.0-rc-2023-11-10;
-
-
-interface error {
- /// A resource which represents some error information.
- ///
- /// The only method provided by this resource is `to-debug-string`,
- /// which provides some human-readable information about the error.
- ///
- /// In the `wasi:io` package, this resource is returned through the
- /// `wasi:io/streams/stream-error` type.
- ///
- /// To provide more specific error information, other interfaces may
- /// provide functions to further "downcast" this error into more specific
- /// error information. For example, `error`s returned in streams derived
- /// from filesystem types to be described using the filesystem's own
- /// error-code type, using the function
- /// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter
- /// `borrow` and returns
- /// `option`.
- ///
- /// The set of functions which can "downcast" an `error` into a more
- /// concrete type is open.
- resource error {
- /// Returns a string that is suitable to assist humans in debugging
- /// this error.
- ///
- /// WARNING: The returned string should not be consumed mechanically!
- /// It may change across platforms, hosts, or other implementation
- /// details. Parsing this string is a major platform-compatibility
- /// hazard.
- to-debug-string: func() -> string;
- }
-}
diff --git a/wit/deps/io/poll.wit b/wit/deps/io/poll.wit
index bddde3c..0829a7d 100644
--- a/wit/deps/io/poll.wit
+++ b/wit/deps/io/poll.wit
@@ -1,4 +1,4 @@
-package wasi:io@0.2.0-rc-2023-11-10;
+package wasi:io;
/// A poll API intended to let users wait for I/O events on multiple handles
/// at once.
diff --git a/wit/deps/io/streams.wit b/wit/deps/io/streams.wit
index e7e1b68..8999b28 100644
--- a/wit/deps/io/streams.wit
+++ b/wit/deps/io/streams.wit
@@ -1,4 +1,4 @@
-package wasi:io@0.2.0-rc-2023-11-10;
+package wasi:io;
/// WASI I/O is an I/O abstraction API which is currently focused on providing
/// stream types.
@@ -6,7 +6,6 @@ package wasi:io@0.2.0-rc-2023-11-10;
/// In the future, the component model is expected to add built-in stream types;
/// when it does, they are expected to subsume this API.
interface streams {
- use error.{error};
use poll.{pollable};
/// An error for input-stream and output-stream operations.
@@ -21,6 +20,26 @@ interface streams {
closed
}
+ /// Contextual error information about the last failure that happened on
+ /// a read, write, or flush from an `input-stream` or `output-stream`.
+ ///
+ /// This type is returned through the `stream-error` type whenever an
+ /// operation on a stream directly fails or an error is discovered
+ /// after-the-fact, for example when a write's failure shows up through a
+ /// later `flush` or `check-write`.
+ ///
+ /// Interfaces such as `wasi:filesystem/types` provide functionality to
+ /// further "downcast" this error into interface-specific error information.
+ resource error {
+ /// Returns a string that's suitable to assist humans in debugging this
+ /// error.
+ ///
+ /// The returned string will change across platforms and hosts which
+ /// means that parsing it, for example, would be a
+ /// platform-compatibility hazard.
+ to-debug-string: func() -> string;
+ }
+
/// An input bytestream.
///
/// `input-stream`s are *non-blocking* to the extent practical on underlying
diff --git a/wit/deps/io/world.wit b/wit/deps/io/world.wit
index 8243da2..05244a9 100644
--- a/wit/deps/io/world.wit
+++ b/wit/deps/io/world.wit
@@ -1,4 +1,4 @@
-package wasi:io@0.2.0-rc-2023-11-10;
+package wasi:io;
world imports {
import streams;
diff --git a/wit/ip-name-lookup.wit b/wit/ip-name-lookup.wit
index 12f86b5..22113ae 100644
--- a/wit/ip-name-lookup.wit
+++ b/wit/ip-name-lookup.wit
@@ -1,6 +1,6 @@
interface ip-name-lookup {
- use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
+ use wasi:io/poll.{pollable};
use network.{network, error-code, ip-address, ip-address-family};
diff --git a/wit/tcp.wit b/wit/tcp.wit
index d44e1c2..1de68a7 100644
--- a/wit/tcp.wit
+++ b/wit/tcp.wit
@@ -1,7 +1,7 @@
interface tcp {
- use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream};
- use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
+ use wasi:io/streams.{input-stream, output-stream};
+ use wasi:io/poll.{pollable};
use network.{network, error-code, ip-socket-address, ip-address-family};
enum shutdown-type {
diff --git a/wit/udp.wit b/wit/udp.wit
index 0f5db53..ca497b3 100644
--- a/wit/udp.wit
+++ b/wit/udp.wit
@@ -1,6 +1,6 @@
interface udp {
- use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
+ use wasi:io/poll.{pollable};
use network.{network, error-code, ip-socket-address, ip-address-family};
diff --git a/wit/world.wit b/wit/world.wit
index 49ad8d3..432b0dc 100644
--- a/wit/world.wit
+++ b/wit/world.wit
@@ -1,4 +1,4 @@
-package wasi:sockets@0.2.0-rc-2023-11-10;
+package wasi:sockets;
world imports {
import instance-network;