Skip to content

Commit

Permalink
Use @unstable for timezone.
Browse files Browse the repository at this point in the history
wasi-clocks commit 4c5d1ef773c69211bd26cd157666a19896e0b7a5
  • Loading branch information
cdmurph32 committed Jun 17, 2024
1 parent 0ea0f2e commit 04fbb1d
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/cli/imports.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package wasi:cli@0.2.0;

world imports {
include wasi:clocks/imports@0.2.1;
include wasi:clocks/imports@0.2.0;
include wasi:filesystem/imports@0.2.0;
include wasi:sockets/imports@0.2.0;
include wasi:random/imports@0.2.0;
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
/// time.
///
Expand Down
6 changes: 5 additions & 1 deletion crates/wasi-http/wit/deps/clocks/timezone.wit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;

@unstable(feature = clocks-timezone)
interface timezone {
use wall-clock.{datetime};

Expand All @@ -10,15 +11,18 @@ interface timezone {
/// If the timezone cannot be determined for the given `datetime`, return a
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
/// saving time.
@unstable(feature = clocks-timezone)
display: func(when: datetime) -> timezone-display;

/// The same as `display`, but only return the UTC offset.
@unstable(feature = clocks-timezone)
utc-offset: func(when: datetime) -> s32;

/// Information useful for displaying the timezone of a specific `datetime`.
///
/// This information may vary within a single `timezone` to reflect daylight
/// saving time adjustments.
@unstable(feature = clocks-timezone)
record timezone-display {
/// The number of seconds difference between UTC time and the local
/// time of the timezone.
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/clocks/wall-clock.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;
/// WASI Wall Clock is a clock API intended to let users query the current
/// time. The name "wall" makes an analogy to a "clock on the wall", which
/// is not necessarily monotonic as it may be reset.
Expand Down
3 changes: 2 additions & 1 deletion crates/wasi-http/wit/deps/clocks/world.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;

world imports {
import monotonic-clock;
import wall-clock;
@unstable(feature = clocks-timezone)
import timezone;
}
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/filesystem/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package wasi:[email protected];
/// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md
interface types {
use wasi:io/streams@0.2.0.{input-stream, output-stream, error};
use wasi:clocks/wall-clock@0.2.1.{datetime};
use wasi:clocks/wall-clock@0.2.0.{datetime};

/// File size or length of a region within a file.
type filesize = u64;
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/http/proxy.wit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package wasi:[email protected];
/// outgoing HTTP requests.
world proxy {
/// HTTP proxies have access to time and randomness.
include wasi:clocks/imports@0.2.1;
include wasi:clocks/imports@0.2.0;
import wasi:random/random@0.2.0;

/// Proxies have standard output and error streams which are expected to
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/http/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// HTTP Requests and Responses, both incoming and outgoing, as well as
/// their headers, trailers, and bodies.
interface types {
use wasi:clocks/monotonic-clock@0.2.1.{duration};
use wasi:clocks/monotonic-clock@0.2.0.{duration};
use wasi:io/streams@0.2.0.{input-stream, output-stream};
use wasi:io/error@0.2.0.{error as io-error};
use wasi:io/poll@0.2.0.{pollable};
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi-http/wit/deps/sockets/tcp.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
interface tcp {
use wasi:io/streams@0.2.0.{input-stream, output-stream};
use wasi:io/poll@0.2.0.{pollable};
use wasi:clocks/monotonic-clock@0.2.1.{duration};
use wasi:clocks/monotonic-clock@0.2.0.{duration};
use network.{network, error-code, ip-socket-address, ip-address-family};

enum shutdown-type {
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/cli/imports.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package wasi:cli@0.2.0;

world imports {
include wasi:clocks/imports@0.2.1;
include wasi:clocks/imports@0.2.0;
include wasi:filesystem/imports@0.2.0;
include wasi:sockets/imports@0.2.0;
include wasi:random/imports@0.2.0;
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
/// time.
///
Expand Down
6 changes: 5 additions & 1 deletion crates/wasi/wit/deps/clocks/timezone.wit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;

@unstable(feature = clocks-timezone)
interface timezone {
use wall-clock.{datetime};

Expand All @@ -10,15 +11,18 @@ interface timezone {
/// If the timezone cannot be determined for the given `datetime`, return a
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
/// saving time.
@unstable(feature = clocks-timezone)
display: func(when: datetime) -> timezone-display;

/// The same as `display`, but only return the UTC offset.
@unstable(feature = clocks-timezone)
utc-offset: func(when: datetime) -> s32;

/// Information useful for displaying the timezone of a specific `datetime`.
///
/// This information may vary within a single `timezone` to reflect daylight
/// saving time adjustments.
@unstable(feature = clocks-timezone)
record timezone-display {
/// The number of seconds difference between UTC time and the local
/// time of the timezone.
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/clocks/wall-clock.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;
/// WASI Wall Clock is a clock API intended to let users query the current
/// time. The name "wall" makes an analogy to a "clock on the wall", which
/// is not necessarily monotonic as it may be reset.
Expand Down
3 changes: 2 additions & 1 deletion crates/wasi/wit/deps/clocks/world.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.0;

world imports {
import monotonic-clock;
import wall-clock;
@unstable(feature = clocks-timezone)
import timezone;
}
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/filesystem/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package wasi:[email protected];
/// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md
interface types {
use wasi:io/streams@0.2.0.{input-stream, output-stream, error};
use wasi:clocks/wall-clock@0.2.1.{datetime};
use wasi:clocks/wall-clock@0.2.0.{datetime};

/// File size or length of a region within a file.
type filesize = u64;
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/http/proxy.wit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package wasi:[email protected];
/// outgoing HTTP requests.
world proxy {
/// HTTP proxies have access to time and randomness.
include wasi:clocks/imports@0.2.1;
include wasi:clocks/imports@0.2.0;
import wasi:random/random@0.2.0;

/// Proxies have standard output and error streams which are expected to
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/http/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// HTTP Requests and Responses, both incoming and outgoing, as well as
/// their headers, trailers, and bodies.
interface types {
use wasi:clocks/monotonic-clock@0.2.1.{duration};
use wasi:clocks/monotonic-clock@0.2.0.{duration};
use wasi:io/streams@0.2.0.{input-stream, output-stream};
use wasi:io/error@0.2.0.{error as io-error};
use wasi:io/poll@0.2.0.{pollable};
Expand Down
2 changes: 1 addition & 1 deletion crates/wasi/wit/deps/sockets/tcp.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
interface tcp {
use wasi:io/streams@0.2.0.{input-stream, output-stream};
use wasi:io/poll@0.2.0.{pollable};
use wasi:clocks/monotonic-clock@0.2.1.{duration};
use wasi:clocks/monotonic-clock@0.2.0.{duration};
use network.{network, error-code, ip-socket-address, ip-address-family};

enum shutdown-type {
Expand Down

0 comments on commit 04fbb1d

Please sign in to comment.