Skip to content

Commit 773dd75

Browse files
committed
fix: pin deps to relative paths
Note this caught and required an update to 0.3.0-draft proposals to get the latest types for clocks.
1 parent 85cf3ed commit 773dd75

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+462
-476
lines changed
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
[clocks]
2-
sha256 = "cf61a3785c2838340ce530ee1cdc6dbee3257f1672d6000ca748dfe253808dec"
3-
sha512 = "f647de7d6c470595c3e5bf0dba6af98703beb9f701c66543cea5d42e81f7a1a73f199c3949035a9c2c1bd717056e5e68788f520af39b9d26480242b7626f22ce"
2+
path = "../../clocks/wit-0.3.0-draft"
3+
sha256 = "6c0d121ab51a75ad7e348129631cd721885ad994f38317af887137fdf4b0ff6d"
4+
sha512 = "dadf98b75fd14f67ad95dcb595eadcc21bf846ba9301b0bcec062e0a6fdad9bdacb0927927b319ef082f105433f6fa298c52687cb17e9fdb2bb21e05fb288fce"
45

56
[filesystem]
6-
url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz"
7-
subdir = "wit-0.3.0-draft"
8-
sha256 = "99292288bdb7ecb04e0a1a7bee478a9410df9ab57af222c3dcde375f7b957181"
9-
sha512 = "4da72faf65b99263bd0521871a6004ea19fc9189e906451fb4d48b83d9da3269a8e4470c5775faf037a05e03151a0c05fd05cc0dfeb36757715fda2799dd1d85"
10-
deps = ["clocks"]
7+
path = "../../filesystem/wit-0.3.0-draft"
8+
sha256 = "0cc915eec8544a2d1e24358de902005ba2ae3595047ae5ab5bfa3e2b1b803922"
9+
sha512 = "ba1899426490b9f27836ae9ef50799cbaf8976c1a6c081d91de897ee630a69db7dc2e48d627aff9024129d476c044522c23616c8df6e8304cec7c4e69f803a78"
1110

1211
[random]
13-
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
14-
subdir = "wit-0.3.0-draft"
12+
path = "../../random/wit-0.3.0-draft"
1513
sha256 = "0a0cead69094ce1773468ff363b2d324ded025aab4f03a1d53b2538710c31e43"
1614
sha512 = "3596bbd164c28254aefb0f7c7a047d81121df1de170808d16975f021c5170ea35dfe6fc1867f93469013ab8d36df8de14d4c5e1c9b70197bfd10e699fd6757e5"
1715

1816
[sockets]
19-
url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz"
20-
subdir = "wit-0.3.0-draft"
21-
sha256 = "57e9d6df8389015116c5407641af76b717cf0d1a79e36384af3cb7d7fa9687ed"
22-
sha512 = "45dab8dd2fa48450c480b1e770a3739793f6156b07b39075414510ce2cde3db6e714da87f47f0e9b9c82b5ef38a963a59f4d86449aa5f2310c78bc79134d0dd5"
23-
deps = ["clocks"]
17+
path = "../../sockets/wit-0.3.0-draft"
18+
sha256 = "4964bac273f53af2cb15aa4cf8d0fe8bf46d7005b4b6d83e48a2423108f3b7ec"
19+
sha512 = "6999f873305c8fc3892756115c1cb155df77c71d1f94c3285a2e5643eaef8f2423437bd235da3920740c2b3a8c1afb1cc13b4a622f4edaffd16fb75cdbb40057"
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
filesystem = { url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz", subdir = "wit-0.3.0-draft" }
2-
random = { url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz", subdir = "wit-0.3.0-draft" }
3-
sockets = { url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz", subdir = "wit-0.3.0-draft" }
1+
clocks = "../../clocks/wit-0.3.0-draft"
2+
sockets = "../../sockets/wit-0.3.0-draft"
3+
random = "../../random/wit-0.3.0-draft"
4+
filesystem = "../../filesystem/wit-0.3.0-draft"

proposals/cli/wit-0.3.0-draft/deps/clocks/monotonic-clock.wit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@ package wasi:clocks@0.3.0-rc-2025-09-16;
1111
interface monotonic-clock {
1212
use types.{duration};
1313

14-
/// An instant in time, in nanoseconds. An instant is relative to an
14+
/// A mark on a monotonic clock is a number of nanoseconds since an
1515
/// unspecified initial value, and can only be compared to instances from
1616
/// the same monotonic-clock.
1717
@since(version = 0.3.0-rc-2025-09-16)
18-
type instant = u64;
18+
type mark = u64;
1919

2020
/// Read the current value of the clock.
2121
///
2222
/// The clock is monotonic, therefore calling this function repeatedly will
2323
/// produce a sequence of non-decreasing values.
2424
///
2525
/// For completeness, this function traps if it's not possible to represent
26-
/// the value of the clock in an `instant`. Consequently, implementations
26+
/// the value of the clock in a `mark`. Consequently, implementations
2727
/// should ensure that the starting time is low enough to avoid the
2828
/// possibility of overflow in practice.
2929
@since(version = 0.3.0-rc-2025-09-16)
30-
now: func() -> instant;
30+
now: func() -> mark;
3131

3232
/// Query the resolution of the clock. Returns the duration of time
3333
/// corresponding to a clock tick.
3434
@since(version = 0.3.0-rc-2025-09-16)
3535
get-resolution: func() -> duration;
3636

37-
/// Wait until the specified instant has occurred.
37+
/// Wait until the specified mark has occurred.
3838
@since(version = 0.3.0-rc-2025-09-16)
3939
wait-until: async func(
40-
when: instant,
40+
when: mark,
4141
);
4242

4343
/// Wait for the specified duration to elapse.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package wasi:clocks@0.3.0-rc-2025-09-16;
2+
/// WASI System Clock is a clock API intended to let users query the current
3+
/// time. The clock is not necessarily monotonic as it may be reset.
4+
///
5+
/// It is intended to be portable at least between Unix-family platforms and
6+
/// Windows.
7+
///
8+
/// External references may be reset, so this clock is not necessarily
9+
/// monotonic, making it unsuitable for measuring elapsed time.
10+
///
11+
/// It is intended for reporting the current date and time for humans.
12+
@since(version = 0.3.0-rc-2025-09-16)
13+
interface system-clock {
14+
use types.{duration};
15+
16+
/// An "instant", or "exact time", is a point in time without regard to any
17+
/// time zone: just the time since a particular external reference point,
18+
/// often called an "epoch".
19+
///
20+
/// Here, the epoch is 1970-01-01T00:00:00Z, also known as
21+
/// [POSIX's Seconds Since the Epoch], also known as [Unix Time].
22+
///
23+
/// Note that even if the seconds field is negative, incrementing
24+
/// nanoseconds always represents moving forwards in time.
25+
/// For example, `{ -1 seconds, 999999999 nanoseconds }` represents the
26+
/// instant one nanosecond before the epoch.
27+
/// For more on various different ways to represent time, see
28+
/// https://tc39.es/proposal-temporal/docs/timezone.html
29+
///
30+
/// [POSIX's Seconds Since the Epoch]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html#tag_21_04_16
31+
/// [Unix Time]: https://en.wikipedia.org/wiki/Unix_time
32+
@since(version = 0.3.0-rc-2025-09-16)
33+
record instant {
34+
seconds: s64,
35+
nanoseconds: u32,
36+
}
37+
38+
/// Read the current value of the clock.
39+
///
40+
/// This clock is not monotonic, therefore calling this function repeatedly
41+
/// will not necessarily produce a sequence of non-decreasing values.
42+
///
43+
/// The nanoseconds field of the output is always less than 1000000000.
44+
@since(version = 0.3.0-rc-2025-09-16)
45+
now: func() -> instant;
46+
47+
/// Query the resolution of the clock. Returns the smallest duration of time
48+
/// that the implementation permits distinguishing.
49+
@since(version = 0.3.0-rc-2025-09-16)
50+
get-resolution: func() -> duration;
51+
}

proposals/cli/wit-0.3.0-draft/deps/clocks/timezone.wit

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,44 @@ package wasi:clocks@0.3.0-rc-2025-09-16;
33
@unstable(feature = clocks-timezone)
44
interface timezone {
55
@unstable(feature = clocks-timezone)
6-
use wall-clock.{datetime};
6+
use system-clock.{instant};
77

8-
/// Return information needed to display the given `datetime`. This includes
9-
/// the UTC offset, the time zone name, and a flag indicating whether
10-
/// daylight saving time is active.
8+
/// Return the IANA identifier of the currently configured timezone. This
9+
/// should be an identifier from the IANA Time Zone Database.
1110
///
12-
/// If the timezone cannot be determined for the given `datetime`, return a
13-
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
14-
/// saving time.
11+
/// For displaying to a user, the identifier should be converted into a
12+
/// localized name by means of an internationalization API.
13+
///
14+
/// If the implementation does not expose an actual timezone, or is unable
15+
/// to provide mappings from times to deltas between the configured timezone
16+
/// and UTC, or determining the current timezone fails, or the timezone does
17+
/// not have an IANA identifier, this returns nothing.
1518
@unstable(feature = clocks-timezone)
16-
display: func(when: datetime) -> timezone-display;
19+
iana-id: func() -> option<string>;
1720

18-
/// The same as `display`, but only return the UTC offset.
21+
/// The number of nanoseconds difference between UTC time and the local
22+
/// time of the currently configured timezone, at the exact time of
23+
/// `instant`.
24+
///
25+
/// The magnitude of the returned value will always be less than
26+
/// 86,400,000,000,000 which is the number of nanoseconds in a day
27+
/// (24*60*60*1e9).
28+
///
29+
/// If the implementation does not expose an actual timezone, or is unable
30+
/// to provide mappings from times to deltas between the configured timezone
31+
/// and UTC, or determining the current timezone fails, this returns
32+
/// nothing.
1933
@unstable(feature = clocks-timezone)
20-
utc-offset: func(when: datetime) -> s32;
34+
utc-offset: func(when: instant) -> option<s64>;
2135

22-
/// Information useful for displaying the timezone of a specific `datetime`.
36+
/// Returns a string that is suitable to assist humans in debugging whether
37+
/// any timezone is available, and if so, which. This may be the same string
38+
/// as `iana-id`, or a formatted representation of the UTC offset such as
39+
/// `-04:00`, or something else.
2340
///
24-
/// This information may vary within a single `timezone` to reflect daylight
25-
/// saving time adjustments.
41+
/// WARNING: The returned string should not be consumed mechanically! It may
42+
/// change across platforms, hosts, or other implementation details. Parsing
43+
/// this string is a major platform-compatibility hazard.
2644
@unstable(feature = clocks-timezone)
27-
record timezone-display {
28-
/// The number of seconds difference between UTC time and the local
29-
/// time of the timezone.
30-
///
31-
/// The returned value will always be less than 86400 which is the
32-
/// number of seconds in a day (24*60*60).
33-
///
34-
/// In implementations that do not expose an actual time zone, this
35-
/// should return 0.
36-
utc-offset: s32,
37-
38-
/// The abbreviated name of the timezone to display to a user. The name
39-
/// `UTC` indicates Coordinated Universal Time. Otherwise, this should
40-
/// reference local standards for the name of the time zone.
41-
///
42-
/// In implementations that do not expose an actual time zone, this
43-
/// should be the string `UTC`.
44-
///
45-
/// In time zones that do not have an applicable name, a formatted
46-
/// representation of the UTC offset may be returned, such as `-04:00`.
47-
name: string,
48-
49-
/// Whether daylight saving time is active.
50-
///
51-
/// In implementations that do not expose an actual time zone, this
52-
/// should return false.
53-
in-daylight-saving-time: bool,
54-
}
45+
to-debug-string: func() -> string;
5546
}

proposals/cli/wit-0.3.0-draft/deps/clocks/wall-clock.wit

Lines changed: 0 additions & 46 deletions
This file was deleted.

proposals/cli/wit-0.3.0-draft/deps/clocks/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ world imports {
55
@since(version = 0.3.0-rc-2025-09-16)
66
import monotonic-clock;
77
@since(version = 0.3.0-rc-2025-09-16)
8-
import wall-clock;
8+
import system-clock;
99
@unstable(feature = clocks-timezone)
1010
import timezone;
1111
}

proposals/cli/wit-0.3.0-draft/deps/filesystem/types.wit

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ package wasi:filesystem@0.3.0-rc-2025-09-16;
2626
@since(version = 0.3.0-rc-2025-09-16)
2727
interface types {
2828
@since(version = 0.3.0-rc-2025-09-16)
29-
use wasi:clocks/wall-clock@0.3.0-rc-2025-09-16.{datetime};
29+
use wasi:clocks/system-clock@0.3.0-rc-2025-09-16.{instant};
3030

3131
/// File size or length of a region within a file.
3232
@since(version = 0.3.0-rc-2025-09-16)
@@ -116,17 +116,17 @@ interface types {
116116
///
117117
/// If the `option` is none, the platform doesn't maintain an access
118118
/// timestamp for this file.
119-
data-access-timestamp: option<datetime>,
119+
data-access-timestamp: option<instant>,
120120
/// Last data modification timestamp.
121121
///
122122
/// If the `option` is none, the platform doesn't maintain a
123123
/// modification timestamp for this file.
124-
data-modification-timestamp: option<datetime>,
124+
data-modification-timestamp: option<instant>,
125125
/// Last file status-change timestamp.
126126
///
127127
/// If the `option` is none, the platform doesn't maintain a
128128
/// status-change timestamp for this file.
129-
status-change-timestamp: option<datetime>,
129+
status-change-timestamp: option<instant>,
130130
}
131131

132132
/// Flags determining the method of how paths are resolved.
@@ -163,7 +163,7 @@ interface types {
163163
/// with the filesystem.
164164
now,
165165
/// Set the timestamp to the given value.
166-
timestamp(datetime),
166+
timestamp(instant),
167167
}
168168

169169
/// A directory entry.

proposals/cli/wit-0.3.0-draft/deps/sockets/types.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@since(version = 0.3.0-rc-2025-09-16)
22
interface types {
33
@since(version = 0.3.0-rc-2025-09-16)
4-
use wasi:clocks/monotonic-clock@0.3.0-rc-2025-09-16.{duration};
4+
use wasi:clocks/types@0.3.0-rc-2025-09-16.{duration};
55

66
/// Error codes.
77
///

proposals/cli/wit/deps.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
[clocks]
2+
path = "../../clocks/wit"
23
sha256 = "be1d8c61e2544e2b48d902c60df73577e293349063344ce752cda4d323f8b913"
34
sha512 = "0fd7962c62b135da0e584c2b58a55147bf09873848b0bb5bd3913019bc3f8d4b5969fbd6f7f96fd99a015efaf562a3eeafe3bc13049f8572a6e13ef9ef0e7e75"
45

56
[filesystem]
6-
url = "https://github.com/WebAssembly/wasi-filesystem/archive/v0.2.8.tar.gz"
7+
path = "../../filesystem/wit"
78
sha256 = "57c2e5e40c57d54a2eacb55d8855d2963a6c0b33971a3620c1468b732233d593"
89
sha512 = "11d1dee738bea1fdd15f5cc07ea10bfb9953a4e84361bbdc2c1051f9520463329ec839caffe0e5cf22870584846f9bfe627c1b77ee4b555fcc990b8106791c68"
9-
deps = ["clocks", "io"]
1010

1111
[io]
12-
sha256 = "9f1ad5da70f621bbd4c69e3bd90250a0c12ecfde266aa8f99684fc44bc1e7c15"
13-
sha512 = "6d0a9db6848f24762933d1c168a5b5b1065ba838c253ee20454afeb8dd1a049b918d25deff556083d68095dd3126ae131ac3e738774320eee5d918f5a4b5354e"
12+
path = "../../io/wit"
13+
sha256 = "ffac709ff8fb80c6decb60be7db656fac0837e0ef60c590baac1f30da6df7ea9"
14+
sha512 = "199614903d351845872d2e44a9a816f456593dd24823e90829a2cfe4c19047dadc1bb2d5feec48a7e47be1cbbdb491ea7021c710ec6e957045ebea769501b92a"
1415

1516
[random]
16-
url = "https://github.com/WebAssembly/wasi-random/archive/v0.2.8.tar.gz"
17+
path = "../../random/wit"
1718
sha256 = "febd6f75dec1fa733b8e25c1cdee4de9acd922ddf755a192d85f479b1f96b445"
1819
sha512 = "1689d2eee3c64b9fc91faaf43741ff95f343b05acc758342dbf3aa86830de1ec66b4bcd0fe22bf1f77abc4a1feeaae90cdc2c06eedc30952a6667f70edca7d8f"
1920

2021
[sockets]
21-
url = "https://github.com/WebAssembly/wasi-sockets/archive/v0.2.8.tar.gz"
22+
path = "../../sockets/wit"
2223
sha256 = "e82bb0502324f44ef22f6fdadec51f4963faf8ccd21187c37397ea872c0548c0"
2324
sha512 = "b8139db2b26a95d6948e345cf036497883943134ea832abfabd7267682d9f84b4c86ff38fc771125f1a8e2bcd237ea0a731d83bf22df9d78f19e452061227d77"
24-
deps = ["clocks", "io"]

0 commit comments

Comments
 (0)