From 9926ba532edb4176efde238a82f6a47669f81439 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Thu, 12 Oct 2023 12:25:41 -0700 Subject: [PATCH 1/3] wit: delete wasi logging package missed this in a code review --- crates/wasi/wit/deps/logging/logging.wit | 37 ------------------------ crates/wasi/wit/deps/logging/world.wit | 5 ---- 2 files changed, 42 deletions(-) delete mode 100644 crates/wasi/wit/deps/logging/logging.wit delete mode 100644 crates/wasi/wit/deps/logging/world.wit diff --git a/crates/wasi/wit/deps/logging/logging.wit b/crates/wasi/wit/deps/logging/logging.wit deleted file mode 100644 index da537e479926..000000000000 --- a/crates/wasi/wit/deps/logging/logging.wit +++ /dev/null @@ -1,37 +0,0 @@ -package wasi:logging; - -/// WASI Logging is a logging API intended to let users emit log messages with -/// simple priority levels and context values. -interface logging { - /// A log level, describing a kind of message. - enum level { - /// Describes messages about the values of variables and the flow of - /// control within a program. - trace, - - /// Describes messages likely to be of interest to someone debugging a - /// program. - debug, - - /// Describes messages likely to be of interest to someone monitoring a - /// program. - info, - - /// Describes messages indicating hazardous situations. - warn, - - /// Describes messages indicating serious errors. - error, - - /// Describes messages indicating fatal errors. - critical, - } - - /// Emit a log message. - /// - /// A log message has a `level` describing what kind of message is being - /// sent, a context, which is an uninterpreted string meant to help - /// consumers group similar messages, and a string containing the message - /// text. - log: func(level: level, context: string, message: string); -} diff --git a/crates/wasi/wit/deps/logging/world.wit b/crates/wasi/wit/deps/logging/world.wit deleted file mode 100644 index ede6286430b6..000000000000 --- a/crates/wasi/wit/deps/logging/world.wit +++ /dev/null @@ -1,5 +0,0 @@ -package wasi:logging; - -world imports { - import logging; -} From de93a4f6ccb75b87bc710c9d26d465b3802053bd Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Thu, 12 Oct 2023 12:26:21 -0700 Subject: [PATCH 2/3] command extended: use include keyword, delete import of logging --- crates/wasi/wit/command-extended.wit | 33 +--------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/crates/wasi/wit/command-extended.wit b/crates/wasi/wit/command-extended.wit index b4d08aed3f3b..37e4fcb92a8a 100644 --- a/crates/wasi/wit/command-extended.wit +++ b/crates/wasi/wit/command-extended.wit @@ -1,37 +1,6 @@ // All of the same imports and exports available in the wasi:cli/command world // with addition of HTTP proxy related imports: world command-extended { - import wasi:clocks/wall-clock; - import wasi:clocks/monotonic-clock; - import wasi:clocks/timezone; - import wasi:filesystem/types; - import wasi:filesystem/preopens; - import wasi:sockets/instance-network; - import wasi:sockets/ip-name-lookup; - import wasi:sockets/network; - import wasi:sockets/tcp-create-socket; - import wasi:sockets/tcp; - import wasi:sockets/udp-create-socket; - import wasi:sockets/udp; - import wasi:random/random; - import wasi:random/insecure; - import wasi:random/insecure-seed; - import wasi:io/poll; - import wasi:io/streams; - import wasi:cli/environment; - import wasi:cli/exit; - import wasi:cli/stdin; - import wasi:cli/stdout; - import wasi:cli/stderr; - import wasi:cli/terminal-input; - import wasi:cli/terminal-output; - import wasi:cli/terminal-stdin; - import wasi:cli/terminal-stdout; - import wasi:cli/terminal-stderr; - - // We should replace all others with `include self.command` - // as soon as the unioning of worlds is available: - // https://github.com/WebAssembly/component-model/issues/169 - import wasi:logging/logging; + include wasi:cli/command; import wasi:http/outgoing-handler; } From 81734beb1eaf71bd6fe51fd7805db6811d7e7f43 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Thu, 12 Oct 2023 12:27:08 -0700 Subject: [PATCH 3/3] sync http wit definitions --- crates/wasi-http/wit/command-extended.wit | 33 +---------------- crates/wasi-http/wit/deps/logging/logging.wit | 37 ------------------- crates/wasi-http/wit/deps/logging/world.wit | 5 --- 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 crates/wasi-http/wit/deps/logging/logging.wit delete mode 100644 crates/wasi-http/wit/deps/logging/world.wit diff --git a/crates/wasi-http/wit/command-extended.wit b/crates/wasi-http/wit/command-extended.wit index b4d08aed3f3b..37e4fcb92a8a 100644 --- a/crates/wasi-http/wit/command-extended.wit +++ b/crates/wasi-http/wit/command-extended.wit @@ -1,37 +1,6 @@ // All of the same imports and exports available in the wasi:cli/command world // with addition of HTTP proxy related imports: world command-extended { - import wasi:clocks/wall-clock; - import wasi:clocks/monotonic-clock; - import wasi:clocks/timezone; - import wasi:filesystem/types; - import wasi:filesystem/preopens; - import wasi:sockets/instance-network; - import wasi:sockets/ip-name-lookup; - import wasi:sockets/network; - import wasi:sockets/tcp-create-socket; - import wasi:sockets/tcp; - import wasi:sockets/udp-create-socket; - import wasi:sockets/udp; - import wasi:random/random; - import wasi:random/insecure; - import wasi:random/insecure-seed; - import wasi:io/poll; - import wasi:io/streams; - import wasi:cli/environment; - import wasi:cli/exit; - import wasi:cli/stdin; - import wasi:cli/stdout; - import wasi:cli/stderr; - import wasi:cli/terminal-input; - import wasi:cli/terminal-output; - import wasi:cli/terminal-stdin; - import wasi:cli/terminal-stdout; - import wasi:cli/terminal-stderr; - - // We should replace all others with `include self.command` - // as soon as the unioning of worlds is available: - // https://github.com/WebAssembly/component-model/issues/169 - import wasi:logging/logging; + include wasi:cli/command; import wasi:http/outgoing-handler; } diff --git a/crates/wasi-http/wit/deps/logging/logging.wit b/crates/wasi-http/wit/deps/logging/logging.wit deleted file mode 100644 index da537e479926..000000000000 --- a/crates/wasi-http/wit/deps/logging/logging.wit +++ /dev/null @@ -1,37 +0,0 @@ -package wasi:logging; - -/// WASI Logging is a logging API intended to let users emit log messages with -/// simple priority levels and context values. -interface logging { - /// A log level, describing a kind of message. - enum level { - /// Describes messages about the values of variables and the flow of - /// control within a program. - trace, - - /// Describes messages likely to be of interest to someone debugging a - /// program. - debug, - - /// Describes messages likely to be of interest to someone monitoring a - /// program. - info, - - /// Describes messages indicating hazardous situations. - warn, - - /// Describes messages indicating serious errors. - error, - - /// Describes messages indicating fatal errors. - critical, - } - - /// Emit a log message. - /// - /// A log message has a `level` describing what kind of message is being - /// sent, a context, which is an uninterpreted string meant to help - /// consumers group similar messages, and a string containing the message - /// text. - log: func(level: level, context: string, message: string); -} diff --git a/crates/wasi-http/wit/deps/logging/world.wit b/crates/wasi-http/wit/deps/logging/world.wit deleted file mode 100644 index ede6286430b6..000000000000 --- a/crates/wasi-http/wit/deps/logging/world.wit +++ /dev/null @@ -1,5 +0,0 @@ -package wasi:logging; - -world imports { - import logging; -}